* [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3
@ 2019-10-10 22:59 Soeren Moch
2019-10-10 22:59 ` [U-Boot] [PATCH 2/3] board: tbs2910: Convert pci to driver model Soeren Moch
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Soeren Moch @ 2019-10-10 22:59 UTC (permalink / raw)
To: u-boot
Signed-off-by: Soeren Moch <smoch@web.de>
---
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: u-boot at lists.denx.de
---
arch/arm/dts/imx6q-tbs2910.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/imx6q-tbs2910.dts b/arch/arm/dts/imx6q-tbs2910.dts
index 21e62c0cab..cc5df37b46 100644
--- a/arch/arm/dts/imx6q-tbs2910.dts
+++ b/arch/arm/dts/imx6q-tbs2910.dts
@@ -24,6 +24,7 @@
};
memory at 10000000 {
+ device_type = "memory";
reg = <0x10000000 0x80000000>;
};
@@ -104,7 +105,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
status = "okay";
};
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/3] board: tbs2910: Convert pci to driver model
2019-10-10 22:59 [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3 Soeren Moch
@ 2019-10-10 22:59 ` Soeren Moch
2019-10-14 12:40 ` sbabic at denx.de
2019-10-10 22:59 ` [U-Boot] [PATCH 3/3] board: tbs2910: Convert eth " Soeren Moch
2019-10-14 12:40 ` [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3 sbabic at denx.de
2 siblings, 1 reply; 6+ messages in thread
From: Soeren Moch @ 2019-10-10 22:59 UTC (permalink / raw)
To: u-boot
So we can get rid of legacy pci config code.
PCI_PNP is not required for this board, remove it to reduce the size of the
u-boot binary.
DM_PCI does not start the host controller automatically anymore. Do so
in preboot instead.
Signed-off-by: Soeren Moch <smoch@web.de>
---
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: u-boot at lists.denx.de
---
board/tbs/tbs2910/tbs2910.c | 17 -----------------
configs/tbs2910_defconfig | 4 +++-
2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c
index d8db7a884f..efc6f88198 100644
--- a/board/tbs/tbs2910/tbs2910.c
+++ b/board/tbs/tbs2910/tbs2910.c
@@ -22,10 +22,6 @@
#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
-#define WEAK_PULLUP (PAD_CTL_PUS_47K_UP | \
- PAD_CTL_SPEED_LOW | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \
- PAD_CTL_SRE_SLOW)
-
#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \
PAD_CTL_SRE_FAST | PAD_CTL_HYS)
@@ -63,13 +59,6 @@ static iomux_v3_cfg_t const enet_pads[] = {
MX6_PAD_ENET_CRS_DV__GPIO1_IO25 | MUX_PAD_CTRL(NO_PAD_CTRL),
};
-static iomux_v3_cfg_t const pcie_pads[] = {
- /* W_DISABLE# */
- MX6_PAD_KEY_COL4__GPIO4_IO14 | MUX_PAD_CTRL(WEAK_PULLUP),
- /* PERST# */
- MX6_PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
int dram_init(void)
{
gd->ram_size = 2048ul * 1024 * 1024;
@@ -87,11 +76,6 @@ static void setup_iomux_enet(void)
gpio_set_value(IMX_GPIO_NR(1, 25), 1);
}
-static void setup_pcie(void)
-{
- imx_iomux_v3_setup_multiple_pads(pcie_pads, ARRAY_SIZE(pcie_pads));
-}
-
static void setup_iomux_uart(void)
{
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
@@ -236,7 +220,6 @@ int board_phy_config(struct phy_device *phydev)
int board_eth_init(bd_t *bis)
{
setup_iomux_enet();
- setup_pcie();
return cpu_eth_init(bis);
}
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index 3148a325e9..98e5ca0846 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -9,7 +9,7 @@ CONFIG_CMD_HDMIDETECT=y
CONFIG_AHCI=y
CONFIG_BOOTDELAY=3
CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi"
+CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi"
CONFIG_PRE_CONSOLE_BUFFER=y
CONFIG_SUPPORT_RAW_INITRD=y
CONFIG_BOUNCE_BUFFER=y
@@ -54,6 +54,8 @@ CONFIG_FSL_USDHC=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_PCI=y
+CONFIG_DM_PCI=y
+# CONFIG_PCI_PNP is not set
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_DM_RTC=y
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 3/3] board: tbs2910: Convert eth to driver model
2019-10-10 22:59 [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3 Soeren Moch
2019-10-10 22:59 ` [U-Boot] [PATCH 2/3] board: tbs2910: Convert pci to driver model Soeren Moch
@ 2019-10-10 22:59 ` Soeren Moch
2019-10-14 12:40 ` sbabic at denx.de
2019-10-14 12:40 ` [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3 sbabic at denx.de
2 siblings, 1 reply; 6+ messages in thread
From: Soeren Moch @ 2019-10-10 22:59 UTC (permalink / raw)
To: u-boot
So we can remove lots of legacy config code.
Signed-off-by: Soeren Moch <smoch@web.de>
---
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: u-boot at lists.denx.de
---
board/tbs/tbs2910/tbs2910.c | 75 -------------------------------------
configs/tbs2910_defconfig | 3 ++
include/configs/tbs2910.h | 9 -----
3 files changed, 3 insertions(+), 84 deletions(-)
diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c
index efc6f88198..b4fd183394 100644
--- a/board/tbs/tbs2910/tbs2910.c
+++ b/board/tbs/tbs2910/tbs2910.c
@@ -14,8 +14,6 @@
#include <asm/mach-imx/video.h>
#include <mmc.h>
#include <fsl_esdhc_imx.h>
-#include <miiphy.h>
-#include <netdev.h>
#include <asm/arch/mxc_hdmi.h>
#include <asm/arch/crm_regs.h>
#include <asm/io.h>
@@ -26,9 +24,6 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \
PAD_CTL_SRE_FAST | PAD_CTL_HYS)
-#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \
- PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
-
static iomux_v3_cfg_t const uart1_pads[] = {
MX6_PAD_CSI0_DAT10__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
MX6_PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
@@ -39,43 +34,12 @@ static iomux_v3_cfg_t const uart2_pads[] = {
MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
};
-static iomux_v3_cfg_t const enet_pads[] = {
- MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_RD1__RGMII_RD1 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_RD2__RGMII_RD2 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_RD3__RGMII_RD3 | MUX_PAD_CTRL(ENET_PAD_CTRL),
- MX6_PAD_RGMII_RX_CTL__RGMII_RX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL),
- /* AR8035 PHY Reset */
- MX6_PAD_ENET_CRS_DV__GPIO1_IO25 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
int dram_init(void)
{
gd->ram_size = 2048ul * 1024 * 1024;
return 0;
}
-static void setup_iomux_enet(void)
-{
- imx_iomux_v3_setup_multiple_pads(enet_pads, ARRAY_SIZE(enet_pads));
-
- /* Reset AR8035 PHY */
- gpio_request(IMX_GPIO_NR(1, 25), "ETH_PHY_RESET");
- gpio_direction_output(IMX_GPIO_NR(1, 25) , 0);
- udelay(500);
- gpio_set_value(IMX_GPIO_NR(1, 25), 1);
-}
-
static void setup_iomux_uart(void)
{
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
@@ -184,45 +148,6 @@ static void setup_display(void)
}
#endif /* CONFIG_VIDEO_IPUV3 */
-static int ar8035_phy_fixup(struct phy_device *phydev)
-{
- unsigned short val;
-
- /* To enable AR8035 ouput a 125MHz clk from CLK_25M */
- phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x7);
- phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x8016);
- phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x4007);
-
- val = phy_read(phydev, MDIO_DEVAD_NONE, 0xe);
- val &= 0xffe3;
- val |= 0x18;
- phy_write(phydev, MDIO_DEVAD_NONE, 0xe, val);
-
- /* introduce tx clock delay */
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x5);
- val = phy_read(phydev, MDIO_DEVAD_NONE, 0x1e);
- val |= 0x0100;
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, val);
-
- return 0;
-}
-
-int board_phy_config(struct phy_device *phydev)
-{
- ar8035_phy_fixup(phydev);
-
- if (phydev->drv->config)
- phydev->drv->config(phydev);
-
- return 0;
-}
-
-int board_eth_init(bd_t *bis)
-{
- setup_iomux_enet();
- return cpu_eth_init(bis);
-}
-
int board_early_init_f(void)
{
setup_iomux_uart();
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index 98e5ca0846..42e6f58eee 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -52,6 +52,9 @@ CONFIG_DM_KEYBOARD=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
CONFIG_PHYLIB=y
+CONFIG_PHY_ATHEROS=y
+CONFIG_DM_ETH=y
+CONFIG_FEC_MXC=y
CONFIG_MII=y
CONFIG_PCI=y
CONFIG_DM_PCI=y
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index 11f76e777b..46d67a7fcf 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -40,15 +40,6 @@
#define CONFIG_MXC_UART
#define CONFIG_MXC_UART_BASE UART1_BASE /* select UART1/UART2 */
-/* Ethernet */
-#define CONFIG_FEC_MXC
-#define CONFIG_FEC_MXC
-#define IMX_FEC_BASE ENET_BASE_ADDR
-#define CONFIG_FEC_XCV_TYPE RGMII
-#define CONFIG_ETHPRIME "FEC"
-#define CONFIG_FEC_MXC_PHYADDR 4
-#define CONFIG_PHY_ATHEROS
-
/* Framebuffer */
#ifdef CONFIG_VIDEO
#define CONFIG_VIDEO_BMP_RLE8
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 3/3] board: tbs2910: Convert eth to driver model
2019-10-10 22:59 ` [U-Boot] [PATCH 3/3] board: tbs2910: Convert eth " Soeren Moch
@ 2019-10-14 12:40 ` sbabic at denx.de
0 siblings, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2019-10-14 12:40 UTC (permalink / raw)
To: u-boot
> So we can remove lots of legacy config code.
> Signed-off-by: Soeren Moch <smoch@web.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3
2019-10-10 22:59 [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3 Soeren Moch
2019-10-10 22:59 ` [U-Boot] [PATCH 2/3] board: tbs2910: Convert pci to driver model Soeren Moch
2019-10-10 22:59 ` [U-Boot] [PATCH 3/3] board: tbs2910: Convert eth " Soeren Moch
@ 2019-10-14 12:40 ` sbabic at denx.de
2 siblings, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2019-10-14 12:40 UTC (permalink / raw)
To: u-boot
> Signed-off-by: Soeren Moch <smoch@web.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/3] board: tbs2910: Convert pci to driver model
2019-10-10 22:59 ` [U-Boot] [PATCH 2/3] board: tbs2910: Convert pci to driver model Soeren Moch
@ 2019-10-14 12:40 ` sbabic at denx.de
0 siblings, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2019-10-14 12:40 UTC (permalink / raw)
To: u-boot
> So we can get rid of legacy pci config code.
> PCI_PNP is not required for this board, remove it to reduce the size of the
> u-boot binary.
> DM_PCI does not start the host controller automatically anymore. Do so
> in preboot instead.
> Signed-off-by: Soeren Moch <smoch@web.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-10-14 12:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-10 22:59 [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3 Soeren Moch
2019-10-10 22:59 ` [U-Boot] [PATCH 2/3] board: tbs2910: Convert pci to driver model Soeren Moch
2019-10-14 12:40 ` sbabic at denx.de
2019-10-10 22:59 ` [U-Boot] [PATCH 3/3] board: tbs2910: Convert eth " Soeren Moch
2019-10-14 12:40 ` sbabic at denx.de
2019-10-14 12:40 ` [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3 sbabic at denx.de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox