Skip to contentSkip to conversation

imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

PATCH Superseded Ariel D'Alessandro 4 participants 12 messages Feb 17, 2022 – Mar 21, 2022

Subsystems (9)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 cover imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

Introduce BSH SystemMaster (SMM) S2 board family, which consists of:
iMX8MN SMM S2 and iMX8MN SMM S2 PRO boards.

This patchset also adds support for NXP TJA11xx Ethernet PHYs.

Changes in v3:
* Added nxp-c45-tja11xx driver.
* Added ethernet support to iMX8MN BSH SMM S2 boards.

Changes in v2:
* Properly added MAINTAINERS entry.
* Fixed binman configuration.
* Picked device tree from kernel.
* Removed CONFIG_SPL_BUILD anti-pattern in board config.
* Removed downstream stuff in bootargs.
* Added board documentation.

Ariel D'Alessandro (4):
phy: nxp-c45-tja11xx: Rename functions to be c45 tja11xx specific
iopoll: Extend read_poll_timeout macro to support variable parameters
net: phy: Add phy_modify() accessor
bsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

Michael Trimarchi (2):
imx8m: add regs used by GPMI
net: phy: nxp-tja11xx: Add NXP TJA11xx PHY driver

 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi    | 423 ++++++++
 .../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi  | 225 +++++
 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi    |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2.dts            |  48 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts         |  80 ++
 arch/arm/include/asm/arch-imx8m/imx-regs.h    |   7 +
 arch/arm/mach-imx/imx8m/Kconfig               |  15 +
 arch/arm/mach-socfpga/reset_manager_s10.c     |  20 +-
 board/bsh/imx8mn_smm_s2/Kconfig               |  49 +
 board/bsh/imx8mn_smm_s2/MAINTAINERS           |   8 +
 board/bsh/imx8mn_smm_s2/Makefile              |  13 +
 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c   | 941 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c   | 941 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c       |  23 +
 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg |  10 +
 board/bsh/imx8mn_smm_s2/spl.c                 |  93 ++
 configs/imx8mn_bsh_smm_s2_defconfig           |  97 ++
 configs/imx8mn_bsh_smm_s2pro_defconfig        |  94 ++
 doc/board/bsh/imx8mn_bsh_smm_s2.rst           |  62 ++
 doc/board/bsh/index.rst                       |   9 +
 doc/board/index.rst                           |   1 +
 drivers/mmc/rockchip_sdhci.c                  |   9 +-
 drivers/net/phy/Kconfig                       |   5 +
 drivers/net/phy/Makefile                      |   1 +
 drivers/net/phy/nxp-c45-tja11xx.c             |   6 +-
 drivers/net/phy/nxp-tja11xx.c                 | 277 ++++++
 drivers/net/phy/phy.c                         |  23 +
 include/configs/imx8mn_bsh_smm_s2.h           |  52 +
 include/configs/imx8mn_bsh_smm_s2_common.h    |  62 ++
 include/configs/imx8mn_bsh_smm_s2pro.h        |  35 +
 include/linux/iopoll.h                        |  12 +-
 include/phy.h                                 |   3 +
 34 files changed, 3654 insertions(+), 22 deletions(-)
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2.dts
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts
 create mode 100644 board/bsh/imx8mn_smm_s2/Kconfig
 create mode 100644 board/bsh/imx8mn_smm_s2/MAINTAINERS
 create mode 100644 board/bsh/imx8mn_smm_s2/Makefile
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg
 create mode 100644 board/bsh/imx8mn_smm_s2/spl.c
 create mode 100644 configs/imx8mn_bsh_smm_s2_defconfig
 create mode 100644 configs/imx8mn_bsh_smm_s2pro_defconfig
 create mode 100644 doc/board/bsh/imx8mn_bsh_smm_s2.rst
 create mode 100644 doc/board/bsh/index.rst
 create mode 100644 drivers/net/phy/nxp-tja11xx.c
 create mode 100644 include/configs/imx8mn_bsh_smm_s2.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2_common.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2pro.h
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/6 imx8m: add regs used by GPMI

From: Michael Trimarchi <[email protected]>

Add regs used by GPMI

---
 arch/arm/include/asm/arch-imx8m/imx-regs.h | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/include/asm/arch-imx8m/imx-regs.h +7 -0
index 45d95a7c197..fb665412465 100644
@@ -58,6 +58,13 @@
 #define SRC_DDRC_RCR_ADDR	0x30391000
 #define SRC_DDRC2_RCR_ADDR	0x30391004
 
+#define APBH_DMA_ARB_BASE_ADDR	0x33000000
+#define APBH_DMA_ARB_END_ADDR	0x33007FFF
+#define MXS_APBH_BASE		APBH_DMA_ARB_BASE_ADDR
+
+#define MXS_GPMI_BASE		(APBH_DMA_ARB_BASE_ADDR + 0x02000)
+#define MXS_BCH_BASE		(APBH_DMA_ARB_BASE_ADDR + 0x04000)
+
 #define DDRC_DDR_SS_GPR0	0x3d000000
 #define DDRC_IPS_BASE_ADDR(X)	(0x3d400000 + ((X) * 0x2000000))
 #define DDR_CSD1_BASE_ADDR	0x40000000
Signature · 1 line
2.34.1
#2 lore raw

PATCH v3 2/6 phy: nxp-c45-tja11xx: Rename functions to be c45 tja11xx specific

In reply to Ariel D'Alessandro

This driver supports NXP C45 TJA11XX PHYs, but there're also other NXP TJA11XX PHYs. Let's rename functions in this driver to be c45 variant specific, so further drivers can be introduced adding support for NXP TJA11XX PHYs.

---
 drivers/net/phy/nxp-c45-tja11xx.c | 6 +++---
 drivers/net/phy/phy.c             | 2 +-
 include/phy.h                     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/phy/nxp-c45-tja11xx.c +3 -3
index f86e31f0d9e..a0f41fab698 100644
@@ -330,7 +330,7 @@ static int nxp_c45_probe(struct phy_device *phydev)
 	return 0;
 }
 
-static struct phy_driver nxp_tja11xx = {
+static struct phy_driver nxp_c45_tja11xx = {
 	.name = "NXP C45 TJA1103",
 	.uid  = PHY_ID_TJA_1103,
 	.mask = 0xfffff0,
@@ -341,8 +341,8 @@ static struct phy_driver nxp_tja11xx = {
 	.shutdown = &genphy_shutdown,
 };
 
-int phy_nxp_tja11xx_init(void)
+int phy_nxp_c45_tja11xx_init(void)
 {
-	phy_register(&nxp_tja11xx);
+	phy_register(&nxp_c45_tja11xx);
 	return 0;
 }
drivers/net/phy/phy.c +1 -1
index c9fc20855ba..9935e40fcdc 100644
@@ -530,7 +530,7 @@ int phy_init(void)
 	phy_natsemi_init();
 #endif
 #ifdef CONFIG_NXP_C45_TJA11XX_PHY
-	phy_nxp_tja11xx_init();
+	phy_nxp_c45_tja11xx_init();
 #endif
 #ifdef CONFIG_PHY_REALTEK
 	phy_realtek_init();
include/phy.h +1 -1
index c66fd43ea88..d4035fdef2b 100644
@@ -527,7 +527,7 @@ int phy_micrel_ksz8xxx_init(void);
 int phy_micrel_ksz90x1_init(void);
 int phy_meson_gxl_init(void);
 int phy_natsemi_init(void);
-int phy_nxp_tja11xx_init(void);
+int phy_nxp_c45_tja11xx_init(void);
 int phy_realtek_init(void);
 int phy_smsc_init(void);
 int phy_teranetics_init(void);
Signature · 1 line
2.34.1
#3 lore raw

PATCH v3 3/6 iopoll: Extend read_poll_timeout macro to support variable parameters

In reply to Ariel D'Alessandro

This macro currently supports only one parameter. Based on Linux iopoll, let's extend read_poll_timeout common API to allow multiple variable parameters.

---
 arch/arm/mach-socfpga/reset_manager_s10.c | 20 +++++++++++---------
 drivers/mmc/rockchip_sdhci.c              |  9 +++++----
 include/linux/iopoll.h                    | 12 ++++++------
 3 files changed, 22 insertions(+), 19 deletions(-)
arch/arm/mach-socfpga/reset_manager_s10.c +11 -9
index d2337bd4d62..f47fec10a0c 100644
@@ -80,9 +80,9 @@ void socfpga_bridges_reset(int enable)
 			     ~0);
 
 		/* Poll until all idleack to 0 */
-		read_poll_timeout(readl, socfpga_get_sysmgr_addr() +
-				  SYSMGR_SOC64_NOC_IDLEACK, reg, !reg, 1000,
-				  300000);
+		read_poll_timeout(readl, reg, !reg, 1000, 300000,
+				  socfpga_get_sysmgr_addr() +
+				  SYSMGR_SOC64_NOC_IDLEACK);
 	} else {
 		/* set idle request to all bridges */
 		writel(~0,
@@ -93,18 +93,20 @@ void socfpga_bridges_reset(int enable)
 		writel(1, socfpga_get_sysmgr_addr() + SYSMGR_SOC64_NOC_TIMEOUT);
 
 		/* Poll until all idleack to 1 */
-		read_poll_timeout(readl, socfpga_get_sysmgr_addr() +
-				  SYSMGR_SOC64_NOC_IDLEACK, reg,
+		read_poll_timeout(readl, reg,
 				  reg == (SYSMGR_NOC_H2F_MSK |
 					  SYSMGR_NOC_LWH2F_MSK),
-				  1000, 300000);
+				  1000, 300000,
+				  socfpga_get_sysmgr_addr() +
+				  SYSMGR_SOC64_NOC_IDLEACK);
 
 		/* Poll until all idlestatus to 1 */
-		read_poll_timeout(readl, socfpga_get_sysmgr_addr() +
-				  SYSMGR_SOC64_NOC_IDLESTATUS, reg,
+		read_poll_timeout(readl, reg,
 				  reg == (SYSMGR_NOC_H2F_MSK |
 					  SYSMGR_NOC_LWH2F_MSK),
-				  1000, 300000);
+				  1000, 300000,
+				  socfpga_get_sysmgr_addr() +
+				  SYSMGR_SOC64_NOC_IDLESTATUS);
 
 		/* Reset all bridges (except NOR DDR scheduler & F2S) */
 		setbits_le32(socfpga_get_rstmgr_addr() + RSTMGR_SOC64_BRGMODRST,
drivers/mmc/rockchip_sdhci.c +5 -4
index 278473899c7..87f14b0ee9c 100644
@@ -146,8 +146,8 @@ static void rk3399_emmc_phy_power_on(struct rockchip_emmc_phy *phy, u32 clock)
 	/* REN Enable on STRB Line for HS400 */
 	writel(RK_CLRSETBITS(0, 1 << 9), &phy->emmcphy_con[2]);
 
-	read_poll_timeout(readl, &phy->emmcphy_status, dllrdy,
-			  PHYCTRL_DLL_LOCK_WO_TMOUT(dllrdy), 1, 5000);
+	read_poll_timeout(readl, dllrdy, PHYCTRL_DLL_LOCK_WO_TMOUT(dllrdy), 1,
+			  5000, &phy->emmcphy_status);
 }
 
 static void rk3399_emmc_phy_power_off(struct rockchip_emmc_phy *phy)
@@ -235,8 +235,9 @@ static int rk3568_sdhci_emmc_set_clock(struct sdhci_host *host, unsigned int clo
 			DWCMSHC_EMMC_DLL_START;
 		sdhci_writel(host, extra, DWCMSHC_EMMC_DLL_CTRL);
 
-		ret = read_poll_timeout(readl, host->ioaddr + DWCMSHC_EMMC_DLL_STATUS0,
-					val, DLL_LOCK_WO_TMOUT(val), 1, 500);
+		ret = read_poll_timeout(readl, val, DLL_LOCK_WO_TMOUT(val), 1,
+					500,
+					host->ioaddr + DWCMSHC_EMMC_DLL_STATUS0);
 		if (ret)
 			return ret;
 
include/linux/iopoll.h +6 -6
index 30cdea0cdc1..0ee2bddaa83 100644
@@ -14,11 +14,11 @@
 /**
  * read_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
  * @op: accessor function (takes @addr as its only argument)
- * @addr: Address to poll
  * @val: Variable to read the value into
  * @cond: Break condition (usually involving @val)
  * @sleep_us: Maximum time to sleep in us
  * @timeout_us: Timeout in us, 0 means never timeout
+ * @args: arguments for @op poll
  *
  * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
  * case, the last read value at @addr is stored in @val.
@@ -26,15 +26,15 @@
  * When available, you'll probably want to use one of the specialized
  * macros defined below rather than this macro directly.
  */
-#define read_poll_timeout(op, addr, val, cond, sleep_us, timeout_us)	\
+#define read_poll_timeout(op, val, cond, sleep_us, timeout_us, args...)	\
 ({ \
 	unsigned long timeout = timer_get_us() + timeout_us; \
 	for (;;) { \
-		(val) = op(addr); \
+		(val) = op(args); \
 		if (cond) \
 			break; \
 		if (timeout_us && time_after(timer_get_us(), timeout)) { \
-			(val) = op(addr); \
+			(val) = op(args); \
 			break; \
 		} \
 		if (sleep_us) \
@@ -44,13 +44,13 @@
 })
 
 #define readx_poll_sleep_timeout(op, addr, val, cond, sleep_us, timeout_us) \
-	read_poll_timeout(op, addr, val, cond, sleep_us, timeout_us)
+	read_poll_timeout(op, val, cond, sleep_us, timeout_us, addr)
 
 #define readl_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \
 	readx_poll_sleep_timeout(readl, addr, val, cond, sleep_us, timeout_us)
 
 #define readx_poll_timeout(op, addr, val, cond, timeout_us) \
-	read_poll_timeout(op, addr, val, cond, false, timeout_us)
+	read_poll_timeout(op, val, cond, false, timeout_us, addr)
 
 #define readb_poll_timeout(addr, val, cond, timeout_us) \
 	readx_poll_timeout(readb, addr, val, cond, timeout_us)
Signature · 1 line
2.34.1
#4 lore raw

PATCH v3 4/6 net: phy: Add phy_modify() accessor

In reply to Ariel D'Alessandro

Add read-modify-write unlocked accessor for accessing a PHY register.

---
 drivers/net/phy/phy.c | 20 ++++++++++++++++++++
 include/phy.h         |  2 ++
 2 files changed, 22 insertions(+)
drivers/net/phy/phy.c +20 -0
index 9935e40fcdc..b73361d87d9 100644
@@ -1105,3 +1105,23 @@ int phy_get_interface_by_name(const char *str)
 
 	return -1;
 }
+
+/**
+ * phy_modify - Convenience function for modifying a given PHY register
+ * @phydev: the phy_device struct
+ * @devad: The MMD to read from
+ * @regnum: register number to write
+ * @mask: bit mask of bits to clear
+ * @set: new value of bits set in mask to write to @regnum
+ */
+int phy_modify(struct phy_device *phydev, int devad, int regnum, u16 mask,
+	       u16 set)
+{
+	int ret;
+
+	ret = phy_read(phydev, devad, regnum);
+	if (ret < 0)
+		return ret;
+
+	return phy_write(phydev, devad, regnum, (ret & ~mask) | set);
+}
include/phy.h +2 -0
index d4035fdef2b..2dd2e02ab5d 100644
@@ -500,6 +500,8 @@ int phy_config(struct phy_device *phydev);
 int phy_shutdown(struct phy_device *phydev);
 int phy_register(struct phy_driver *drv);
 int phy_set_supported(struct phy_device *phydev, u32 max_speed);
+int phy_modify(struct phy_device *phydev, int devad, int regnum, u16 mask,
+	       u16 set);
 int genphy_config_aneg(struct phy_device *phydev);
 int genphy_restart_aneg(struct phy_device *phydev);
 int genphy_update_link(struct phy_device *phydev);
Signature · 1 line
2.34.1
Reviewed-by on v3 4/6
#5 lore raw

Re: [PATCH v3 4/6] net: phy: Add phy_modify() accessor

Quoted 51 lines · Ariel D'Alessandro

Add read-modify-write unlocked accessor for accessing a PHY register.

---
 drivers/net/phy/phy.c | 20 ++++++++++++++++++++
 include/phy.h         |  2 ++
 2 files changed, 22 insertions(+)
drivers/net/phy/phy.c +20 -0
index 9935e40fcdc..b73361d87d9 100644
@@ -1105,3 +1105,23 @@ int phy_get_interface_by_name(const char *str)
 
        return -1;
 }
+
+/**
+ * phy_modify - Convenience function for modifying a given PHY register
+ * @phydev: the phy_device struct
+ * @devad: The MMD to read from
+ * @regnum: register number to write
+ * @mask: bit mask of bits to clear
+ * @set: new value of bits set in mask to write to @regnum
+ */
+int phy_modify(struct phy_device *phydev, int devad, int regnum, u16 mask,
+              u16 set)
+{
+       int ret;
+
+       ret = phy_read(phydev, devad, regnum);
+       if (ret < 0)
+               return ret;
+
+       return phy_write(phydev, devad, regnum, (ret & ~mask) | set);
+}
include/phy.h +2 -1
index d4035fdef2b..2dd2e02ab5d 100644
@@ -500,6 +500,8 @@ int phy_config(struct phy_device *phydev);
 int phy_shutdown(struct phy_device *phydev);
 int phy_register(struct phy_driver *drv);
 int phy_set_supported(struct phy_device *phydev, u32 max_speed);
+int phy_modify(struct phy_device *phydev, int devad, int regnum, u16 mask,
+              u16 set);
 int genphy_config_aneg(struct phy_device *phydev);
 int genphy_restart_aneg(struct phy_device *phydev);
 int genphy_update_link(struct phy_device *phydev);
--
Quoted 2 lines

2.34.1

#6 lore raw

PATCH v3 5/6 net: phy: nxp-tja11xx: Add NXP TJA11xx PHY driver

In reply to Ariel D'Alessandro

From: Michael Trimarchi <[email protected]>

Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special BroadRReach 100BaseT1 PHYs used in automotive.

---
 drivers/net/phy/Kconfig       |   5 +
 drivers/net/phy/Makefile      |   1 +
 drivers/net/phy/nxp-tja11xx.c | 277 ++++++++++++++++++++++++++++++++++
 drivers/net/phy/phy.c         |   3 +
 include/phy.h                 |   1 +
 5 files changed, 287 insertions(+)
 create mode 100644 drivers/net/phy/nxp-tja11xx.c
drivers/net/phy/Kconfig +5 -0
index 4f8d33ce8fd..8de6130113c 100644
@@ -211,6 +211,11 @@ config PHY_NXP_C45_TJA11XX
 	  Enable support for NXP C45 TJA11XX PHYs.
 	  Currently supports only the TJA1103 PHY.
 
+config PHY_NXP_TJA11XX
+	bool "NXP TJA11XX Ethernet PHYs support"
+	help
+	  Currently supports the NXP TJA1100 and TJA1101 PHY.
+
 config PHY_REALTEK
 	bool "Realtek Ethernet PHYs support"
 
drivers/net/phy/Makefile +1 -0
index 77f7f606215..7cfbab0b5c8 100644
@@ -24,6 +24,7 @@ obj-$(CONFIG_PHY_MICREL_KSZ90X1) += micrel_ksz90x1.o
 obj-$(CONFIG_PHY_MESON_GXL) += meson-gxl.o
 obj-$(CONFIG_PHY_NATSEMI) += natsemi.o
 obj-$(CONFIG_PHY_NXP_C45_TJA11XX) += nxp-c45-tja11xx.o
+obj-$(CONFIG_PHY_NXP_TJA11XX) += nxp-tja11xx.o
 obj-$(CONFIG_PHY_REALTEK) += realtek.o
 obj-$(CONFIG_PHY_SMSC) += smsc.o
 obj-$(CONFIG_PHY_TERANETICS) += teranetics.o
drivers/net/phy/nxp-tja11xx.c new file +277 -0

277 lines not on this page · raw message

drivers/net/phy/phy.c +3 -0
index b73361d87d9..af55faf55de 100644
@@ -532,6 +532,9 @@ int phy_init(void)
 #ifdef CONFIG_NXP_C45_TJA11XX_PHY
 	phy_nxp_c45_tja11xx_init();
 #endif
+#ifdef CONFIG_PHY_NXP_TJA11XX
+	phy_nxp_tja11xx_init();
+#endif
 #ifdef CONFIG_PHY_REALTEK
 	phy_realtek_init();
 #endif
include/phy.h +1 -0
index 2dd2e02ab5d..bb03c31d851 100644
@@ -530,6 +530,7 @@ int phy_micrel_ksz90x1_init(void);
 int phy_meson_gxl_init(void);
 int phy_natsemi_init(void);
 int phy_nxp_c45_tja11xx_init(void);
+int phy_nxp_tja11xx_init(void);
 int phy_realtek_init(void);
 int phy_smsc_init(void);
 int phy_teranetics_init(void);
Signature · 1 line
2.34.1
Reviewed-by on v3 5/6
#7 lore raw

Re: [PATCH v3 5/6] net: phy: nxp-tja11xx: Add NXP TJA11xx PHY driver

Quoted 355 lines · Ariel D'Alessandro

From: Michael Trimarchi <[email protected]>

Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special BroadRReach 100BaseT1 PHYs used in automotive.

---
 drivers/net/phy/Kconfig       |   5 +
 drivers/net/phy/Makefile      |   1 +
 drivers/net/phy/nxp-tja11xx.c | 277 ++++++++++++++++++++++++++++++++++
 drivers/net/phy/phy.c         |   3 +
 include/phy.h                 |   1 +
 5 files changed, 287 insertions(+)
 create mode 100644 drivers/net/phy/nxp-tja11xx.c
drivers/net/phy/Kconfig +5 -0
index 4f8d33ce8fd..8de6130113c 100644
@@ -211,6 +211,11 @@ config PHY_NXP_C45_TJA11XX
          Enable support for NXP C45 TJA11XX PHYs.
          Currently supports only the TJA1103 PHY.
 
+config PHY_NXP_TJA11XX
+       bool "NXP TJA11XX Ethernet PHYs support"
+       help
+         Currently supports the NXP TJA1100 and TJA1101 PHY.
+
 config PHY_REALTEK
        bool "Realtek Ethernet PHYs support"
 
drivers/net/phy/Makefile +1 -0
index 77f7f606215..7cfbab0b5c8 100644
@@ -24,6 +24,7 @@ obj-$(CONFIG_PHY_MICREL_KSZ90X1) += micrel_ksz90x1.o
 obj-$(CONFIG_PHY_MESON_GXL) += meson-gxl.o
 obj-$(CONFIG_PHY_NATSEMI) += natsemi.o
 obj-$(CONFIG_PHY_NXP_C45_TJA11XX) += nxp-c45-tja11xx.o
+obj-$(CONFIG_PHY_NXP_TJA11XX) += nxp-tja11xx.o
 obj-$(CONFIG_PHY_REALTEK) += realtek.o
 obj-$(CONFIG_PHY_SMSC) += smsc.o
 obj-$(CONFIG_PHY_TERANETICS) += teranetics.o
drivers/net/phy/nxp-tja11xx.c new file +277 -0
new file mode 100644
index 00000000000..30dec5e605b
@@ -0,0 +1,277 @@
+// SPDX-License-Identifier: GPL-2.0
+/* NXP TJA1100 BroadRReach PHY driver
+ *
+ * Copyright (C) 2022 Michael Trimarchi <[email protected]>
+ * Copyright (C) 2022 Ariel D'Alessandro <[email protected]>
+ * Copyright (C) 2018 Marek Vasut <[email protected]>
+ */
+
+#include <common.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
+#include <linux/iopoll.h>
+#include <phy.h>
+
+#define PHY_ID_MASK                    0xfffffff0
+#define PHY_ID_TJA1100                 0x0180dc40
+#define PHY_ID_TJA1101                 0x0180dd00
+
+#define MII_ECTRL                      17
+#define MII_ECTRL_LINK_CONTROL         BIT(15)
+#define MII_ECTRL_POWER_MODE_MASK      GENMASK(14, 11)
+#define MII_ECTRL_POWER_MODE_NO_CHANGE (0x0 << 11)
+#define MII_ECTRL_POWER_MODE_NORMAL    (0x3 << 11)
+#define MII_ECTRL_POWER_MODE_STANDBY   (0xc << 11)
+#define MII_ECTRL_CABLE_TEST           BIT(5)
+#define MII_ECTRL_CONFIG_EN            BIT(2)
+#define MII_ECTRL_WAKE_REQUEST         BIT(0)
+
+#define MII_CFG1                       18
+#define MII_CFG1_MASTER_SLAVE          BIT(15)
+#define MII_CFG1_AUTO_OP               BIT(14)
+#define MII_CFG1_SLEEP_CONFIRM         BIT(6)
+#define MII_CFG1_LED_MODE_MASK         GENMASK(5, 4)
+#define MII_CFG1_LED_MODE_LINKUP       0
+#define MII_CFG1_LED_ENABLE            BIT(3)
+
+#define MII_CFG2                       19
+#define MII_CFG2_SLEEP_REQUEST_TO      GENMASK(1, 0)
+#define MII_CFG2_SLEEP_REQUEST_TO_16MS 0x3
+
+#define MII_INTSRC                     21
+#define MII_INTSRC_LINK_FAIL           BIT(10)
+#define MII_INTSRC_LINK_UP             BIT(9)
+#define MII_INTSRC_MASK                        (MII_INTSRC_LINK_FAIL | \
+                                        MII_INTSRC_LINK_UP)
+#define MII_INTSRC_UV_ERR              BIT(3)
+#define MII_INTSRC_TEMP_ERR            BIT(1)
+
+#define MII_INTEN                      22
+#define MII_INTEN_LINK_FAIL            BIT(10)
+#define MII_INTEN_LINK_UP              BIT(9)
+#define MII_INTEN_UV_ERR               BIT(3)
+#define MII_INTEN_TEMP_ERR             BIT(1)
+
+#define MII_COMMSTAT                   23
+#define MII_COMMSTAT_LINK_UP           BIT(15)
+#define MII_COMMSTAT_SQI_STATE         GENMASK(7, 5)
+#define MII_COMMSTAT_SQI_MAX           7
+
+#define MII_GENSTAT                    24
+#define MII_GENSTAT_PLL_LOCKED         BIT(14)
+
+#define MII_EXTSTAT                    25
+#define MII_EXTSTAT_SHORT_DETECT       BIT(8)
+#define MII_EXTSTAT_OPEN_DETECT                BIT(7)
+#define MII_EXTSTAT_POLARITY_DETECT    BIT(6)
+
+#define MII_COMMCFG                    27
+#define MII_COMMCFG_AUTO_OP            BIT(15)
+
+static inline int tja11xx_set_bits(struct phy_device *phydev, u32 regnum,
+                                  u16 val)
+{
+       return phy_set_bits_mmd(phydev, MDIO_DEVAD_NONE, regnum, val);
+}
+
+static inline int tja11xx_clear_bits(struct phy_device *phydev, u32 regnum,
+                                    u16 val)
+{
+       return phy_clear_bits_mmd(phydev, MDIO_DEVAD_NONE, regnum, val);
+}
+
+static inline int tja11xx_read(struct phy_device *phydev, int regnum)
+{
+       return phy_read(phydev, MDIO_DEVAD_NONE, regnum);
+}
+
+static inline int tja11xx_modify(struct phy_device *phydev, int regnum,
+                                u16 mask, u16 set)
+{
+       return phy_modify(phydev, MDIO_DEVAD_NONE, regnum, mask, set);
+}
+
+static int tja11xx_check(struct phy_device *phydev, u8 reg, u16 mask, u16 set)
+{
+       int val;
+
+       return read_poll_timeout(tja11xx_read, val, (val & mask) == set, 150,
+                                30000, phydev, reg);
+}
+
+static int tja11xx_modify_check(struct phy_device *phydev, u8 reg,
+                           u16 mask, u16 set)
+{
+       int ret;
+
+       ret = tja11xx_modify(phydev, reg, mask, set);
+       if (ret)
+               return ret;
+
+       return tja11xx_check(phydev, reg, mask, set);
+}
+
+static int tja11xx_enable_reg_write(struct phy_device *phydev)
+{
+       return tja11xx_set_bits(phydev, MII_ECTRL, MII_ECTRL_CONFIG_EN);
+}
+
+static int tja11xx_enable_link_control(struct phy_device *phydev)
+{
+       return tja11xx_set_bits(phydev, MII_ECTRL, MII_ECTRL_LINK_CONTROL);
+}
+
+static int tja11xx_wakeup(struct phy_device *phydev)
+{
+       int ret;
+
+       ret = tja11xx_read(phydev, MII_ECTRL);
+       if (ret < 0)
+               return ret;
+
+       switch (ret & MII_ECTRL_POWER_MODE_MASK) {
+       case MII_ECTRL_POWER_MODE_NO_CHANGE:
+               break;
+       case MII_ECTRL_POWER_MODE_NORMAL:
+               ret = tja11xx_set_bits(phydev, MII_ECTRL,
+                                      MII_ECTRL_WAKE_REQUEST);
+               if (ret)
+                       return ret;
+
+               ret = tja11xx_clear_bits(phydev, MII_ECTRL,
+                                        MII_ECTRL_WAKE_REQUEST);
+               if (ret)
+                       return ret;
+               break;
+       case MII_ECTRL_POWER_MODE_STANDBY:
+               ret = tja11xx_modify_check(phydev, MII_ECTRL,
+                                          MII_ECTRL_POWER_MODE_MASK,
+                                          MII_ECTRL_POWER_MODE_STANDBY);
+               if (ret)
+                       return ret;
+
+               ret = tja11xx_modify(phydev, MII_ECTRL,
+                                    MII_ECTRL_POWER_MODE_MASK,
+                                    MII_ECTRL_POWER_MODE_NORMAL);
+               if (ret)
+                       return ret;
+
+               ret = tja11xx_modify_check(phydev, MII_GENSTAT,
+                                          MII_GENSTAT_PLL_LOCKED,
+                                          MII_GENSTAT_PLL_LOCKED);
+               if (ret)
+                       return ret;
+
+               return tja11xx_enable_link_control(phydev);
+       default:
+               break;
+       }
+
+       return 0;
+}
+
+static int tja11xx_config_init(struct phy_device *phydev)
+{
+       int ret;
+
+       ret = tja11xx_enable_reg_write(phydev);
+       if (ret)
+               return ret;
+
+       phydev->autoneg = AUTONEG_DISABLE;
+       phydev->speed = SPEED_100;
+       phydev->duplex = DUPLEX_FULL;
+
+       switch (phydev->phy_id & PHY_ID_MASK) {
+       case PHY_ID_TJA1100:
+               ret = tja11xx_modify(phydev, MII_CFG1,
+                                    MII_CFG1_AUTO_OP | MII_CFG1_LED_MODE_MASK |
+                                    MII_CFG1_LED_ENABLE,
+                                    MII_CFG1_AUTO_OP |
+                                    MII_CFG1_LED_MODE_LINKUP |
+                                    MII_CFG1_LED_ENABLE);
+               if (ret)
+                       return ret;
+               break;
+       case PHY_ID_TJA1101:
+               ret = tja11xx_set_bits(phydev, MII_COMMCFG,
+                                      MII_COMMCFG_AUTO_OP);
+               if (ret)
+                       return ret;
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       ret = tja11xx_clear_bits(phydev, MII_CFG1, MII_CFG1_SLEEP_CONFIRM);
+       if (ret)
+               return ret;
+
+       ret = tja11xx_modify(phydev, MII_CFG2, MII_CFG2_SLEEP_REQUEST_TO,
+                            MII_CFG2_SLEEP_REQUEST_TO_16MS);
+       if (ret)
+               return ret;
+
+       ret = tja11xx_wakeup(phydev);
+       if (ret < 0)
+               return ret;
+
+       /* ACK interrupts by reading the status register */
+       ret = tja11xx_read(phydev, MII_INTSRC);
+       if (ret < 0)
+               return ret;
+
+       return 0;
+}
+
+static int tja11xx_startup(struct phy_device *phydev)
+{
+       int ret;
+
+       ret = genphy_update_link(phydev);
+       if (ret)
+               return ret;
+
+       ret = tja11xx_read(phydev, MII_CFG1);
+       if (ret < 0)
+               return ret;
+
+       if (phydev->link) {
+               ret = tja11xx_read(phydev, MII_COMMSTAT);
+               if (ret < 0)
+                       return ret;
+
+               if (!(ret & MII_COMMSTAT_LINK_UP))
+                       phydev->link = 0;
+       }
+
+       return 0;
+}
+
+static struct phy_driver TJA1100_driver = {
+       .name = "NXP TJA1100",
+       .uid = PHY_ID_TJA1100,
+       .mask = PHY_ID_MASK,
+       .features = PHY_BASIC_FEATURES,
+       .config = &tja11xx_config_init,
+       .startup = &tja11xx_startup,
+       .shutdown = &genphy_shutdown,
+};
+
+static struct phy_driver TJA1101_driver = {
+       .name = "NXP TJA1101",
+       .uid = PHY_ID_TJA1101,
+       .mask = PHY_ID_MASK,
+       .features = PHY_BASIC_FEATURES,
+       .config = &tja11xx_config_init,
+       .startup = &tja11xx_startup,
+       .shutdown = &genphy_shutdown,
+};
+
+int phy_nxp_tja11xx_init(void)
+{
+       phy_register(&TJA1100_driver);
+       phy_register(&TJA1101_driver);
+
+       return 0;
+}
drivers/net/phy/phy.c +3 -0
index b73361d87d9..af55faf55de 100644
@@ -532,6 +532,9 @@ int phy_init(void)
 #ifdef CONFIG_NXP_C45_TJA11XX_PHY
        phy_nxp_c45_tja11xx_init();
 #endif
+#ifdef CONFIG_PHY_NXP_TJA11XX
+       phy_nxp_tja11xx_init();
+#endif
 #ifdef CONFIG_PHY_REALTEK
        phy_realtek_init();
 #endif
include/phy.h +1 -1
index 2dd2e02ab5d..bb03c31d851 100644
@@ -530,6 +530,7 @@ int phy_micrel_ksz90x1_init(void);
 int phy_meson_gxl_init(void);
 int phy_natsemi_init(void);
 int phy_nxp_c45_tja11xx_init(void);
+int phy_nxp_tja11xx_init(void);
 int phy_realtek_init(void);
 int phy_smsc_init(void);
 int phy_teranetics_init(void);
--
Quoted 2 lines

2.34.1

#8 lore raw

PATCH v3 6/6 bsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

In reply to Ariel D'Alessandro

Introduce BSH SystemMaster (SMM) S2 board family, which consists of:
iMX8MN SMM S2 and iMX8MN SMM S2 PRO boards.

Add support for iMX8MN BSH SMM S2 board:

- 256 MiB DDR3 RAM
- 512MiB Nand
- USBOTG1 peripheral - fastboot.
- 100Mbit Ethernet

Add support for iMX8MN BSH SMM S2 PRO board:

- 512 MiB DDR3 RAM
- 8 GiB eMMC
- USBOTG1 peripheral - fastboot.
- 100Mbit Ethernet

---
 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi    | 423 ++++++++
 .../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi  | 225 +++++
 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi    |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2.dts            |  48 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts         |  80 ++
 arch/arm/mach-imx/imx8m/Kconfig               |  15 +
 board/bsh/imx8mn_smm_s2/Kconfig               |  49 +
 board/bsh/imx8mn_smm_s2/MAINTAINERS           |   8 +
 board/bsh/imx8mn_smm_s2/Makefile              |  13 +
 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c   | 941 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c   | 941 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c       |  23 +
 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg |  10 +
 board/bsh/imx8mn_smm_s2/spl.c                 |  93 ++
 configs/imx8mn_bsh_smm_s2_defconfig           |  97 ++
 configs/imx8mn_bsh_smm_s2pro_defconfig        |  94 ++
 doc/board/bsh/imx8mn_bsh_smm_s2.rst           |  62 ++
 doc/board/bsh/index.rst                       |   9 +
 doc/board/index.rst                           |   1 +
 include/configs/imx8mn_bsh_smm_s2.h           |  52 +
 include/configs/imx8mn_bsh_smm_s2_common.h    |  62 ++
 include/configs/imx8mn_bsh_smm_s2pro.h        |  35 +
 24 files changed, 3313 insertions(+)
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2.dts
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts
 create mode 100644 board/bsh/imx8mn_smm_s2/Kconfig
 create mode 100644 board/bsh/imx8mn_smm_s2/MAINTAINERS
 create mode 100644 board/bsh/imx8mn_smm_s2/Makefile
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg
 create mode 100644 board/bsh/imx8mn_smm_s2/spl.c
 create mode 100644 configs/imx8mn_bsh_smm_s2_defconfig
 create mode 100644 configs/imx8mn_bsh_smm_s2pro_defconfig
 create mode 100644 doc/board/bsh/imx8mn_bsh_smm_s2.rst
 create mode 100644 doc/board/bsh/index.rst
 create mode 100644 include/configs/imx8mn_bsh_smm_s2.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2_common.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2pro.h
arch/arm/dts/Makefile +2 -0
index 086533b61bb..fc7509e511c 100644
@@ -911,6 +911,8 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mm-venice-gw7902.dtb \
 	imx8mm-verdin.dtb \
 	phycore-imx8mm.dtb \
+	imx8mn-bsh-smm-s2.dtb \
+	imx8mn-bsh-smm-s2pro.dtb \
 	imx8mn-ddr4-evk.dtb \
 	imx8mq-cm.dtb \
 	imx8mn-evk.dtb \
arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi new file +423 -0

423 lines not on this page · raw message

arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi new file +225 -0

225 lines not on this page · raw message

arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi new file +15 -0
new file mode 100644
index 00000000000..bd4da7d34cf
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 Collabora Ltd.
+ * Copyright 2021 BSH Hausgeraete GmbH
+ */
+
+#include "imx8mn-bsh-smm-s2-u-boot-common.dtsi"
+
+&pinctrl_gpmi_nand {
+	u-boot,dm-spl;
+};
+
+&gpmi {
+	u-boot,dm-spl;
+};
arch/arm/dts/imx8mn-bsh-smm-s2.dts new file +48 -0

48 lines not on this page · raw message

arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi new file +15 -0
new file mode 100644
index 00000000000..b8396a46b86
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 Collabora Ltd.
+ * Copyright 2021 BSH Hausgeraete GmbH
+ */
+
+#include "imx8mn-bsh-smm-s2-u-boot-common.dtsi"
+
+&pinctrl_usdhc1 {
+	u-boot,dm-spl;
+};
+
+&usdhc1 {
+	u-boot,dm-spl;
+};
arch/arm/dts/imx8mn-bsh-smm-s2pro.dts new file +80 -0

80 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +15 -0
index 73bc9b34f30..2ae08306061 100644
@@ -78,6 +78,20 @@ config TARGET_IMX8MM_VENICE
 	select SUPPORT_SPL
 	select IMX8M_LPDDR4
 
+config TARGET_IMX8MN_BSH_SMM_S2
+	bool "imx8mn-bsh-smm-s2"
+	select BINMAN
+	select IMX8MN
+	select SUPPORT_SPL
+	select IMX8M_DDR3L
+
+config TARGET_IMX8MN_BSH_SMM_S2PRO
+	bool "imx8mn-bsh-smm-s2pro"
+	select BINMAN
+	select IMX8MN
+	select SUPPORT_SPL
+	select IMX8M_DDR3L
+
 config TARGET_KONTRON_MX8MM
 	bool "Kontron Electronics N80xx"
 	select BINMAN
@@ -186,6 +200,7 @@ endchoice
 
 source "board/beacon/imx8mm/Kconfig"
 source "board/beacon/imx8mn/Kconfig"
+source "board/bsh/imx8mn_smm_s2/Kconfig"
 source "board/compulab/imx8mm-cl-iot-gate/Kconfig"
 source "board/engicam/imx8mm/Kconfig"
 source "board/freescale/imx8mq_evk/Kconfig"
board/bsh/imx8mn_smm_s2/Kconfig new file +49 -0

49 lines not on this page · raw message

board/bsh/imx8mn_smm_s2/MAINTAINERS new file +8 -0
new file mode 100644
index 00000000000..1de816ca871
@@ -0,0 +1,8 @@
+ARM i.MX8MN BSH SMM S2 BOARDS
+M:	Ariel D'Alessandro <[email protected]>
+M:	Michael Trimarchi <[email protected]>
+S:	Maintained
+F:	arch/arm/dts/imx8mn-bsh-smm-s2*
+F:	board/bsh/imx8mn_smm_s2/
+F:	configs/imx8mn_bsh_smm_s2*
+F:	include/configs/imx8mn_bsh_smm_s2*
board/bsh/imx8mn_smm_s2/Makefile new file +13 -0
new file mode 100644
index 00000000000..19d37a723ea
@@ -0,0 +1,13 @@
+#
+# Copyright 2021 Collabora Ltd.
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += imx8mn_smm_s2.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+obj-$(CONFIG_BSH_SMM_S2_DDR3L_256) += ddr3l_timing_256m.o
+obj-$(CONFIG_BSH_SMM_S2_DDR3L_512) += ddr3l_timing_512m.o
+endif
board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c new file +941 -0

941 lines not on this page · raw message

board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c new file +941 -0

941 lines not on this page · raw message

board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c new file +23 -0
new file mode 100644
index 00000000000..0ebf208be82
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 Collabora Ltd.
+ */
+
+#include <common.h>
+#include <asm/arch/sys_proto.h>
+#include <env.h>
+
+int board_init(void)
+{
+	return 0;
+}
+
+int board_late_init(void)
+{
+	if (is_usb_boot()) {
+		env_set("bootcmd", "run bootcmd_mfg");
+		env_set("bootdelay", "0");
+	}
+
+	return 0;
+}
board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg new file +10 -0
new file mode 100644
index 00000000000..2083233e500
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 Collabora Ltd.
+ */
+
+#define __ASSEMBLY__
+
+ROM_VERSION	v2
+BOOT_FROM	sd
+LOADER		u-boot-spl-ddr.bin	0x912000
board/bsh/imx8mn_smm_s2/spl.c new file +93 -0

93 lines not on this page · raw message

configs/imx8mn_bsh_smm_s2_defconfig new file +97 -0

81 lines not on this page · raw message

configs/imx8mn_bsh_smm_s2pro_defconfig new file +94 -0

94 lines not on this page · raw message

doc/board/bsh/imx8mn_bsh_smm_s2.rst new file +62 -0

62 lines not on this page · raw message

doc/board/bsh/index.rst new file +9 -0
new file mode 100644
index 00000000000..570ee4d72ed

Lines of this file are not shown. View the raw message.

doc/board/index.rst +1 -0
index be9ba4de4d0..e5ec4ee57bb 100644

Lines of this file are not shown. View the raw message.

include/configs/imx8mn_bsh_smm_s2.h new file +52 -0

52 lines not on this page · raw message

include/configs/imx8mn_bsh_smm_s2_common.h new file +62 -0

62 lines not on this page · raw message

include/configs/imx8mn_bsh_smm_s2pro.h new file +35 -0
new file mode 100644
index 00000000000..37fda66f98e

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.

#9 lore raw
In reply to Ariel D'Alessandro

Hi Stefano

Any plan to get those boards in?

Quoted 89 lines · Ariel D'Alessandro

Introduce BSH SystemMaster (SMM) S2 board family, which consists of:
iMX8MN SMM S2 and iMX8MN SMM S2 PRO boards.

This patchset also adds support for NXP TJA11xx Ethernet PHYs.

Changes in v3:
* Added nxp-c45-tja11xx driver.
* Added ethernet support to iMX8MN BSH SMM S2 boards.

Changes in v2:
* Properly added MAINTAINERS entry.
* Fixed binman configuration.
* Picked device tree from kernel.
* Removed CONFIG_SPL_BUILD anti-pattern in board config.
* Removed downstream stuff in bootargs.
* Added board documentation.

Ariel D'Alessandro (4):
phy: nxp-c45-tja11xx: Rename functions to be c45 tja11xx specific
iopoll: Extend read_poll_timeout macro to support variable parameters
net: phy: Add phy_modify() accessor
bsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

Michael Trimarchi (2):
imx8m: add regs used by GPMI
net: phy: nxp-tja11xx: Add NXP TJA11xx PHY driver

 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi    | 423 ++++++++
 .../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi  | 225 +++++
 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi    |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2.dts            |  48 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts         |  80 ++
 arch/arm/include/asm/arch-imx8m/imx-regs.h    |   7 +
 arch/arm/mach-imx/imx8m/Kconfig               |  15 +
 arch/arm/mach-socfpga/reset_manager_s10.c     |  20 +-
 board/bsh/imx8mn_smm_s2/Kconfig               |  49 +
 board/bsh/imx8mn_smm_s2/MAINTAINERS           |   8 +
 board/bsh/imx8mn_smm_s2/Makefile              |  13 +
 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c   | 941 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c   | 941 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c       |  23 +
 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg |  10 +
 board/bsh/imx8mn_smm_s2/spl.c                 |  93 ++
 configs/imx8mn_bsh_smm_s2_defconfig           |  97 ++
 configs/imx8mn_bsh_smm_s2pro_defconfig        |  94 ++
 doc/board/bsh/imx8mn_bsh_smm_s2.rst           |  62 ++
 doc/board/bsh/index.rst                       |   9 +
 doc/board/index.rst                           |   1 +
 drivers/mmc/rockchip_sdhci.c                  |   9 +-
 drivers/net/phy/Kconfig                       |   5 +
 drivers/net/phy/Makefile                      |   1 +
 drivers/net/phy/nxp-c45-tja11xx.c             |   6 +-
 drivers/net/phy/nxp-tja11xx.c                 | 277 ++++++
 drivers/net/phy/phy.c                         |  23 +
 include/configs/imx8mn_bsh_smm_s2.h           |  52 +
 include/configs/imx8mn_bsh_smm_s2_common.h    |  62 ++
 include/configs/imx8mn_bsh_smm_s2pro.h        |  35 +
 include/linux/iopoll.h                        |  12 +-
 include/phy.h                                 |   3 +
 34 files changed, 3654 insertions(+), 22 deletions(-)
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2.dts
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts
 create mode 100644 board/bsh/imx8mn_smm_s2/Kconfig
 create mode 100644 board/bsh/imx8mn_smm_s2/MAINTAINERS
 create mode 100644 board/bsh/imx8mn_smm_s2/Makefile
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg
 create mode 100644 board/bsh/imx8mn_smm_s2/spl.c
 create mode 100644 configs/imx8mn_bsh_smm_s2_defconfig
 create mode 100644 configs/imx8mn_bsh_smm_s2pro_defconfig
 create mode 100644 doc/board/bsh/imx8mn_bsh_smm_s2.rst
 create mode 100644 doc/board/bsh/index.rst
 create mode 100644 drivers/net/phy/nxp-tja11xx.c
 create mode 100644 include/configs/imx8mn_bsh_smm_s2.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2_common.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2pro.h

--
2.34.1

Signature · 11 lines
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com
#10 lore raw

Hi Michael,

Quoted 4 lines · Michael Nazzareno Trimarchi

Hi Stefano

Any plan to get those boards in?

Sure, but according how Tom has already set up. Merge window closed at 31th, January, and later patches (as these) if are not fixes, will go into -next.

Best regards,
Stefano

Quoted 93 lines
Quoted 89 lines · Ariel D'Alessandro

Introduce BSH SystemMaster (SMM) S2 board family, which consists of:
iMX8MN SMM S2 and iMX8MN SMM S2 PRO boards.

This patchset also adds support for NXP TJA11xx Ethernet PHYs.

Changes in v3:
* Added nxp-c45-tja11xx driver.
* Added ethernet support to iMX8MN BSH SMM S2 boards.

Changes in v2:
* Properly added MAINTAINERS entry.
* Fixed binman configuration.
* Picked device tree from kernel.
* Removed CONFIG_SPL_BUILD anti-pattern in board config.
* Removed downstream stuff in bootargs.
* Added board documentation.

Ariel D'Alessandro (4):
phy: nxp-c45-tja11xx: Rename functions to be c45 tja11xx specific
iopoll: Extend read_poll_timeout macro to support variable parameters
net: phy: Add phy_modify() accessor
bsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

Michael Trimarchi (2):
imx8m: add regs used by GPMI
net: phy: nxp-tja11xx: Add NXP TJA11xx PHY driver

  arch/arm/dts/Makefile                         |   2 +
  arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi    | 423 ++++++++
  .../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi  | 225 +++++
  arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi    |  15 +
  arch/arm/dts/imx8mn-bsh-smm-s2.dts            |  48 +
  arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi |  15 +
  arch/arm/dts/imx8mn-bsh-smm-s2pro.dts         |  80 ++
  arch/arm/include/asm/arch-imx8m/imx-regs.h    |   7 +
  arch/arm/mach-imx/imx8m/Kconfig               |  15 +
  arch/arm/mach-socfpga/reset_manager_s10.c     |  20 +-
  board/bsh/imx8mn_smm_s2/Kconfig               |  49 +
  board/bsh/imx8mn_smm_s2/MAINTAINERS           |   8 +
  board/bsh/imx8mn_smm_s2/Makefile              |  13 +
  board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c   | 941 ++++++++++++++++++
  board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c   | 941 ++++++++++++++++++
  board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c       |  23 +
  board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg |  10 +
  board/bsh/imx8mn_smm_s2/spl.c                 |  93 ++
  configs/imx8mn_bsh_smm_s2_defconfig           |  97 ++
  configs/imx8mn_bsh_smm_s2pro_defconfig        |  94 ++
  doc/board/bsh/imx8mn_bsh_smm_s2.rst           |  62 ++
  doc/board/bsh/index.rst                       |   9 +
  doc/board/index.rst                           |   1 +
  drivers/mmc/rockchip_sdhci.c                  |   9 +-
  drivers/net/phy/Kconfig                       |   5 +
  drivers/net/phy/Makefile                      |   1 +
  drivers/net/phy/nxp-c45-tja11xx.c             |   6 +-
  drivers/net/phy/nxp-tja11xx.c                 | 277 ++++++
  drivers/net/phy/phy.c                         |  23 +
  include/configs/imx8mn_bsh_smm_s2.h           |  52 +
  include/configs/imx8mn_bsh_smm_s2_common.h    |  62 ++
  include/configs/imx8mn_bsh_smm_s2pro.h        |  35 +
  include/linux/iopoll.h                        |  12 +-
  include/phy.h                                 |   3 +
  34 files changed, 3654 insertions(+), 22 deletions(-)

create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2.dts create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts create mode 100644 board/bsh/imx8mn_smm_s2/Kconfig
create mode 100644 board/bsh/imx8mn_smm_s2/MAINTAINERS create mode 100644 board/bsh/imx8mn_smm_s2/Makefile create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c create mode 100644 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c create mode 100644 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg create mode 100644 board/bsh/imx8mn_smm_s2/spl.c
create mode 100644 configs/imx8mn_bsh_smm_s2_defconfig create mode 100644 configs/imx8mn_bsh_smm_s2pro_defconfig create mode 100644 doc/board/bsh/imx8mn_bsh_smm_s2.rst create mode 100644 doc/board/bsh/index.rst
create mode 100644 drivers/net/phy/nxp-tja11xx.c
create mode 100644 include/configs/imx8mn_bsh_smm_s2.h create mode 100644 include/configs/imx8mn_bsh_smm_s2_common.h create mode 100644 include/configs/imx8mn_bsh_smm_s2pro.h

--
2.34.1

Signature · 5 lines
=====================================================================
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: [email protected]
=====================================================================
#11 lore raw

Hi Stefano

Quoted 4 lines · Stefano Babic

Hi Michael,

On 28.02.22 20:38, Michael Nazzareno Trimarchi wrote:

Quoted 9 lines
Quoted 4 lines

Hi Stefano

Any plan to get those boards in?

Sure, but according how Tom has already set up. Merge window closed at 31th, January, and later patches (as these) if are not fixes, will go into -next.

We would like to know if we have made any progress here.

Michael

Quoted 104 lines

Best regards,
Stefano

Quoted 88 lines
Quoted 86 lines · Ariel D'Alessandro

Introduce BSH SystemMaster (SMM) S2 board family, which consists of:
iMX8MN SMM S2 and iMX8MN SMM S2 PRO boards.

This patchset also adds support for NXP TJA11xx Ethernet PHYs.

Changes in v3:
* Added nxp-c45-tja11xx driver.
* Added ethernet support to iMX8MN BSH SMM S2 boards.

Changes in v2:
* Properly added MAINTAINERS entry.
* Fixed binman configuration.
* Picked device tree from kernel.
* Removed CONFIG_SPL_BUILD anti-pattern in board config.
* Removed downstream stuff in bootargs.
* Added board documentation.

Ariel D'Alessandro (4):
phy: nxp-c45-tja11xx: Rename functions to be c45 tja11xx specific
iopoll: Extend read_poll_timeout macro to support variable parameters
net: phy: Add phy_modify() accessor
bsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

Michael Trimarchi (2):
imx8m: add regs used by GPMI
net: phy: nxp-tja11xx: Add NXP TJA11xx PHY driver

  arch/arm/dts/Makefile                         |   2 +
  arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi    | 423 ++++++++
  .../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi  | 225 +++++
  arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi    |  15 +
  arch/arm/dts/imx8mn-bsh-smm-s2.dts            |  48 +
  arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi |  15 +
  arch/arm/dts/imx8mn-bsh-smm-s2pro.dts         |  80 ++
  arch/arm/include/asm/arch-imx8m/imx-regs.h    |   7 +
  arch/arm/mach-imx/imx8m/Kconfig               |  15 +
  arch/arm/mach-socfpga/reset_manager_s10.c     |  20 +-
  board/bsh/imx8mn_smm_s2/Kconfig               |  49 +
  board/bsh/imx8mn_smm_s2/MAINTAINERS           |   8 +
  board/bsh/imx8mn_smm_s2/Makefile              |  13 +
  board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c   | 941 ++++++++++++++++++
  board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c   | 941 ++++++++++++++++++
  board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c       |  23 +
  board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg |  10 +
  board/bsh/imx8mn_smm_s2/spl.c                 |  93 ++
  configs/imx8mn_bsh_smm_s2_defconfig           |  97 ++
  configs/imx8mn_bsh_smm_s2pro_defconfig        |  94 ++
  doc/board/bsh/imx8mn_bsh_smm_s2.rst           |  62 ++
  doc/board/bsh/index.rst                       |   9 +
  doc/board/index.rst                           |   1 +
  drivers/mmc/rockchip_sdhci.c                  |   9 +-
  drivers/net/phy/Kconfig                       |   5 +
  drivers/net/phy/Makefile                      |   1 +
  drivers/net/phy/nxp-c45-tja11xx.c             |   6 +-
  drivers/net/phy/nxp-tja11xx.c                 | 277 ++++++
  drivers/net/phy/phy.c                         |  23 +
  include/configs/imx8mn_bsh_smm_s2.h           |  52 +
  include/configs/imx8mn_bsh_smm_s2_common.h    |  62 ++
  include/configs/imx8mn_bsh_smm_s2pro.h        |  35 +
  include/linux/iopoll.h                        |  12 +-
  include/phy.h                                 |   3 +
  34 files changed, 3654 insertions(+), 22 deletions(-)

create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2.dts create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts create mode 100644 board/bsh/imx8mn_smm_s2/Kconfig
create mode 100644 board/bsh/imx8mn_smm_s2/MAINTAINERS create mode 100644 board/bsh/imx8mn_smm_s2/Makefile create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c create mode 100644 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c create mode 100644 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg create mode 100644 board/bsh/imx8mn_smm_s2/spl.c
create mode 100644 configs/imx8mn_bsh_smm_s2_defconfig create mode 100644 configs/imx8mn_bsh_smm_s2pro_defconfig create mode 100644 doc/board/bsh/imx8mn_bsh_smm_s2.rst create mode 100644 doc/board/bsh/index.rst
create mode 100644 drivers/net/phy/nxp-tja11xx.c
create mode 100644 include/configs/imx8mn_bsh_smm_s2.h create mode 100644 include/configs/imx8mn_bsh_smm_s2_common.h create mode 100644 include/configs/imx8mn_bsh_smm_s2pro.h

Quoted 5 lines
Quoted 3 lines

--
2.34.1

--
=====================================================================
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: [email protected]
=====================================================================

Signature · 11 lines
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com