mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [For next PATCH 1/2] arm: am33xx: Add rmii2_crs_dv mux selection in SMA2 register
@ 2014-10-30 12:01 Wadim Egorov
  2014-10-30 12:01 ` [For next PATCH 2/2] phyFLEX: Select RMII2_CRS_DV on GPMC_A9 pin Wadim Egorov
  2014-11-03  7:33 ` [For next PATCH 1/2] arm: am33xx: Add rmii2_crs_dv mux selection in SMA2 register Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Wadim Egorov @ 2014-10-30 12:01 UTC (permalink / raw)
  To: barebox

"Silicon revision 1.0 devices only provide the MMC2_DAT7 signal when Mode3 is
selected. Silicon revision 2.0 and newer devices implement another level of
pin multiplexing which provides the original MMC2_DAT7 signal or RMII2_CRS_DV
signal when Mode3 is selected. This new level of of pin multiplexing is
selected with bit zero of the SMA2 register."

See AM335x Sitara Processors Manual.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
 arch/arm/mach-omap/am33xx_generic.c              |   12 ++++++++++++
 arch/arm/mach-omap/include/mach/am33xx-generic.h |    1 +
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap/am33xx_generic.c b/arch/arm/mach-omap/am33xx_generic.c
index f293134..12764bc 100644
--- a/arch/arm/mach-omap/am33xx_generic.c
+++ b/arch/arm/mach-omap/am33xx_generic.c
@@ -428,3 +428,15 @@ void am335x_sdram_init(int ioctrl, const struct am33xx_cmd_control *cmd_ctrl,
 
 	am33xx_config_sdram(emif_regs);
 }
+
+#define AM33XX_CONTROL_SMA2_OFS	0x1320
+
+/**
+ * am33xx_select_rmii2_crs_dv - Select RMII2_CRS_DV on GPMC_A9 pin in MODE3
+ */
+void am33xx_select_rmii2_crs_dv(void)
+{
+	uint32_t val = readl(AM33XX_CTRL_BASE + AM33XX_CONTROL_SMA2_OFS);
+	val |= 0x00000001;
+	writel(val, AM33XX_CTRL_BASE + AM33XX_CONTROL_SMA2_OFS);
+}
diff --git a/arch/arm/mach-omap/include/mach/am33xx-generic.h b/arch/arm/mach-omap/include/mach/am33xx-generic.h
index 6c85d51..1264e7e 100644
--- a/arch/arm/mach-omap/include/mach/am33xx-generic.h
+++ b/arch/arm/mach-omap/include/mach/am33xx-generic.h
@@ -33,5 +33,6 @@ void __noreturn am33xx_reset_cpu(unsigned long addr);
 void am33xx_enable_per_clocks(void);
 int am33xx_init(void);
 int am33xx_devices_init(void);
+void am33xx_select_rmii2_crs_dv(void);
 
 #endif /* __MACH_AM33XX_GENERIC_H */
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [For next PATCH 2/2] phyFLEX: Select RMII2_CRS_DV on GPMC_A9 pin
  2014-10-30 12:01 [For next PATCH 1/2] arm: am33xx: Add rmii2_crs_dv mux selection in SMA2 register Wadim Egorov
@ 2014-10-30 12:01 ` Wadim Egorov
  2014-11-03  7:33 ` [For next PATCH 1/2] arm: am33xx: Add rmii2_crs_dv mux selection in SMA2 register Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Wadim Egorov @ 2014-10-30 12:01 UTC (permalink / raw)
  To: barebox

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
 arch/arm/boards/phytec-phyflex-am335x/board.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/phytec-phyflex-am335x/board.c b/arch/arm/boards/phytec-phyflex-am335x/board.c
index 12fad8f..cf7dd2e 100644
--- a/arch/arm/boards/phytec-phyflex-am335x/board.c
+++ b/arch/arm/boards/phytec-phyflex-am335x/board.c
@@ -89,6 +89,8 @@ static int pfla03_devices_init(void)
 	armlinux_set_architecture(MACH_TYPE_PFLA03);
 	defaultenv_append_directory(defaultenv_phyflex_am335x);
 
+	am33xx_select_rmii2_crs_dv();
+
 	am33xx_bbu_spi_nor_mlo_register_handler("MLO.spi", "/dev/m25p0.xload");
 	am33xx_bbu_spi_nor_register_handler("spi", "/dev/m25p0.barebox");
 	am33xx_bbu_nand_xloadslots_register_handler("MLO.nand",
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [For next PATCH 1/2] arm: am33xx: Add rmii2_crs_dv mux selection in SMA2 register
  2014-10-30 12:01 [For next PATCH 1/2] arm: am33xx: Add rmii2_crs_dv mux selection in SMA2 register Wadim Egorov
  2014-10-30 12:01 ` [For next PATCH 2/2] phyFLEX: Select RMII2_CRS_DV on GPMC_A9 pin Wadim Egorov
@ 2014-11-03  7:33 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2014-11-03  7:33 UTC (permalink / raw)
  To: Wadim Egorov; +Cc: barebox

Hi Wadim,

On Thu, Oct 30, 2014 at 01:01:35PM +0100, Wadim Egorov wrote:
> "Silicon revision 1.0 devices only provide the MMC2_DAT7 signal when Mode3 is
> selected. Silicon revision 2.0 and newer devices implement another level of
> pin multiplexing which provides the original MMC2_DAT7 signal or RMII2_CRS_DV
> signal when Mode3 is selected. This new level of of pin multiplexing is
> selected with bit zero of the SMA2 register."
> 
> See AM335x Sitara Processors Manual.
> 
> Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> ---
>  arch/arm/mach-omap/am33xx_generic.c              |   12 ++++++++++++
>  arch/arm/mach-omap/include/mach/am33xx-generic.h |    1 +
>  2 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap/am33xx_generic.c b/arch/arm/mach-omap/am33xx_generic.c
> index f293134..12764bc 100644
> --- a/arch/arm/mach-omap/am33xx_generic.c
> +++ b/arch/arm/mach-omap/am33xx_generic.c
> @@ -428,3 +428,15 @@ void am335x_sdram_init(int ioctrl, const struct am33xx_cmd_control *cmd_ctrl,
>  
>  	am33xx_config_sdram(emif_regs);
>  }
> +
> +#define AM33XX_CONTROL_SMA2_OFS	0x1320
> +
> +/**
> + * am33xx_select_rmii2_crs_dv - Select RMII2_CRS_DV on GPMC_A9 pin in MODE3
> + */
> +void am33xx_select_rmii2_crs_dv(void)
> +{
> +	uint32_t val = readl(AM33XX_CTRL_BASE + AM33XX_CONTROL_SMA2_OFS);
> +	val |= 0x00000001;
> +	writel(val, AM33XX_CTRL_BASE + AM33XX_CONTROL_SMA2_OFS);
> +}

Is it OK to call this for Silicon revision 1.0 aswell? You seem to do so
in your second patch.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-03  7:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-30 12:01 [For next PATCH 1/2] arm: am33xx: Add rmii2_crs_dv mux selection in SMA2 register Wadim Egorov
2014-10-30 12:01 ` [For next PATCH 2/2] phyFLEX: Select RMII2_CRS_DV on GPMC_A9 pin Wadim Egorov
2014-11-03  7:33 ` [For next PATCH 1/2] arm: am33xx: Add rmii2_crs_dv mux selection in SMA2 register Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox