mx6: clock: Pass the frequency as argument of enable_fec_anatop_clock()
Subsystems (4)
Fabio Estevam
reviewerPATCH v2 1/3 mx6: clock: Pass the frequency as argument of enable_fec_anatop_clock()
From: Fabio Estevam <[email protected]>
Provide an argument to enable_fec_anatop_clock() to specify the clock frequency that will be generated.
No changes are made to mx6slevk, which uses the default 50MHz fec clock.
---
Stefano,
I don't have access to a mx6slevk board at the moment, but will test it on Monday. Wanted to submit it so that people could provide some feedback on the series.
mx6slevk is using the default clock of 50MHz, so I kept it unchanged.
Changes since v1:
- Newly introduced on v2.
arch/arm/cpu/armv7/mx6/clock.c | 8 +++++++- arch/arm/include/asm/arch-mx6/clock.h | 9 ++++++++- board/freescale/mx6slevk/mx6slevk.c | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/mx6/clock.c +7 -1
@@ -322,7 +322,7 @@ static u32 get_mmdc_ch0_clk(void)#endif #ifdef CONFIG_FEC_MXC -int enable_fec_anatop_clock (void ) +int enable_fec_anatop_clock (enum enet_freq freq) {u32 reg =0 ;s32 timeout =100000 ;
@@ -330,7 +330,13 @@ int enable_fec_anatop_clock(void)struct anatop_regs __iomem *anatop = (struct anatop_regs __iomem *)ANATOP_BASE_ADDR ; +if (freq < ENET_25MHz || freq > ENET_125MHz) +return -EINVAL ; + reg =readl (&anatop->pll_enet); + reg &= ~BM_ANADIG_PLL_ENET_DIV_SELECT ; + reg |= freq; +if ((reg &BM_ANADIG_PLL_ENET_POWERDOWN ) || (!(reg &BM_ANADIG_PLL_ENET_LOCK ))) { reg &= ~BM_ANADIG_PLL_ENET_POWERDOWN ;
arch/arm/include/asm/arch-mx6/clock.h +8 -1
@@ -42,6 +42,13 @@ enum mxc_clock { MXC_I2C_CLK, }; +enum enet_freq { + ENET_25MHz, + ENET_50MHz, + ENET_100MHz, + ENET_125MHz, +}; +u32 imx_get_uartclk (void );u32 imx_get_fecclk (void );unsigned int mxc_get_clock (enum mxc_clock clk);
@@ -50,5 +57,5 @@ void enable_usboh3_clk(unsigned char enable);int enable_sata_clock (void );int enable_i2c_clk (unsigned char enable,unsigned i2c_num);void enable_ipu_clock (void ); -int enable_fec_anatop_clock (void ); +int enable_fec_anatop_clock (enum enet_freq freq);#endif /* __ASM_ARCH_CLOCK_H */
board/freescale/mx6slevk/mx6slevk.c +1 -1
@@ -128,7 +128,7 @@ static int setup_fec(void)/* clear gpr1[14], gpr1[18:17] to select anatop clock */ clrsetbits_le32 (&iomuxc_regs->gpr[1 ],IOMUX_GPR1_FEC_MASK ,0 ); - ret =enable_fec_anatop_clock (); + ret =enable_fec_anatop_clock (ENET_50MHz);if (ret)return ret;
Signature · 1 line
1.8.1.2
Fabio Estevam
reviewerPATCH v2 1/3 mx6: clock: Pass the frequency as argument of enable_fec_anatop_clock()
Hi Stefano,
Quoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Provide an argument to
enable_fec_anatop_clock()to specify the clock frequency that will be generated.No changes are made to mx6slevk, which uses the default 50MHz fec clock.
Signed-off-by Fabio Estevam <[email protected]>
Quoted 8 lines
---
Stefano,I don't have access to a mx6slevk board at the moment, but will test it on Monday. Wanted to submit it so that people could provide some feedback on the series.
mx6slevk is using the default clock of 50MHz, so I kept it unchanged.
Just tested on a mx6slevk and confirmed that FEC is functional after this patch.
Regards,
Fabio Estevam
PATCH v2 1/3 mx6: clock: Pass the frequency as argument of enable_fec_anatop_clock()
Hi Fabio,
Quoted 14 lines · Fabio Estevam
Hi Stefano,
Quoted 11 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Provide an argument to
enable_fec_anatop_clock()to specify the clock frequency that will be generated.No changes are made to mx6slevk, which uses the default 50MHz fec clock.
Signed-off-by Fabio Estevam <[email protected]>---
Stefano,
Quoted 8 lines
Quoted 5 lines
I don't have access to a mx6slevk board at the moment, but will test it on Monday. Wanted to submit it so that people could provide some feedback on the series.
mx6slevk is using the default clock of 50MHz, so I kept it unchanged.
Just tested on a mx6slevk and confirmed that FEC is functional after this patch.
Thanks for testing - patch is ok for me.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 =====================================================================
Fabio Estevam
reviewerPATCH v2 2/3 mx6: Add initial support for the Hummingboard solo
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
SolidRun has designed the Hummingboard board based on mx6q/dl/solo.
Add the initial support for the mx6 solo variant.
More information about this hardware can be found at:
http://imx.solid-run.com/wiki/index.php?title=Carrier-One_Hardware
(Carrier-One was the previous name of Hummingboard).
Based on the work from Jon Nettleton <[email protected]>.
---
Changes since v1:
- Addressed many of Stefano's comments about v1
arch/arm/include/asm/arch-mx6/imx-regs.h | 4 + board/solidrun/hummingboard/Makefile | 9 + board/solidrun/hummingboard/README | 40 ++++ board/solidrun/hummingboard/hummingboard.c | 187 +++++++++++++++++ board/solidrun/hummingboard/solo.cfg | 25 +++ board/solidrun/mx6-microsom/800mhz_2x128mx16.cfg | 74 +++++++ board/solidrun/mx6-microsom/clocks.cfg | 33 +++ .../mx6-microsom/ddr-800mhz-32bit-setup.cfg | 76 +++++++ boards.cfg | 1 + include/configs/hummingboard.h | 226 +++++++++++++++++++++ 10 files changed, 675 insertions(+) create mode 100644 board/solidrun/hummingboard/Makefile create mode 100644 board/solidrun/hummingboard/README create mode 100644 board/solidrun/hummingboard/hummingboard.c create mode 100644 board/solidrun/hummingboard/solo.cfg create mode 100644 board/solidrun/mx6-microsom/800mhz_2x128mx16.cfg create mode 100644 board/solidrun/mx6-microsom/clocks.cfg create mode 100644 board/solidrun/mx6-microsom/ddr-800mhz-32bit-setup.cfg create mode 100644 include/configs/hummingboard.h
arch/arm/include/asm/arch-mx6/imx-regs.h +4 -0
@@ -245,6 +245,10 @@ struct src {u32 gpr10; }; +/* GPR1 bitfields */ +#define IOMUXC_GPR1_ENET_CLK_SEL_OFFSET 21 +#define IOMUXC_GPR1_ENET_CLK_SEL_MASK (1 << IOMUXC_GPR1_ENET_CLK_SEL_OFFSET) +/* GPR3 bitfields */ #define IOMUXC_GPR3_GPU_DBG_OFFSET 29#define IOMUXC_GPR3_GPU_DBG_MASK (3<<IOMUXC_GPR3_GPU_DBG_OFFSET)
board/solidrun/hummingboard/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# +# (C) Copyright 2013 Freescale Semiconductor, Inc. +# Copyright (C) 2013, Boundary Devices <[email protected]> +# Copyright (C) 2013, Jon Nettleton <[email protected]> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := hummingboard.o
board/solidrun/hummingboard/README new file +40 -0
@@ -0,0 +1,40 @@ +U-Boot for SolidRun Hummingboard +-------------------------------- + +This file contains information for the port of U-Boot to the Hummingboard. + +For more details about Hummingboard, please refer to: +http://imx.solid-run.com/wiki/index.php?title=Carrier-One_Hardware + +(Carrier-One was the previous name of Hummingboard). + +Building U-boot for Hummingboard +-------------------------------- + +To build U-Boot for the Hummingboard Solo version: + +$ make hummingboard_solo_config +$ make + +Flashing U-boot into the SD card +-------------------------------- + +- After the 'make' command completes, the generated 'u-boot.imx' binary must be +flashed into the SD card: + +$ sudo dd if=u-boot.imx of=/dev/mmcblk0 bs=1k seek=1; sync + +(Note - the SD card node may vary, so adjust this as needed). + +Also, a more detailed explanation on how to format the SD card is available +at doc/README.imximage. + +- Insert the micro SD card into the slot located in the bottom of the board + +- Connect a 3.3V USB to serial converter cable to the host PC. The MX6 UART +signals are available in the 26 pin connector as shown at: +http://imx.solid-run.com/wiki/index.php?title=Carrier-One_Hardware +(Check for "26 pin header layout"). + +- Power up the board via USB cable (CON201) and U-boot messages will appear in +the serial console.
board/solidrun/hummingboard/hummingboard.c new file +187 -0
187 lines not on this page · raw message
board/solidrun/hummingboard/solo.cfg new file +25 -0
@@ -0,0 +1,25 @@ +/* + * Copyright (C) 2013 Boundary Devices + * Copyright (C) 2013 Jon Nettleton <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* image version */ +IMAGE_VERSION 2 + +/* + * Boot Device : one of + * spi, sd (the board has no nand neither onenand) + */ +BOOT_FROM sd + +#define __ASSEMBLY__ +#include <config.h> +#include "asm/arch/mx6-ddr.h" +#include "asm/arch/iomux.h" +#include "asm/arch/crm_regs.h" + +#include "../mx6-microsom/ddr-800mhz-32bit-setup.cfg" +#include "../mx6-microsom/800mhz_2x128mx16.cfg" +#include "../mx6-microsom/clocks.cfg"
board/solidrun/mx6-microsom/800mhz_2x128mx16.cfg new file +74 -0
74 lines not on this page · raw message
board/solidrun/mx6-microsom/clocks.cfg new file +33 -0
@@ -0,0 +1,33 @@ +/* + * Copyright (C) 2013 Boundary Devices + * Copyright (C) 2013 SolidRun ltd. + * Copyright (C) 2013 Jon Nettleton <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* set the default clock gate to save power */ +DATA 4, CCM_CCGR0, 0x00C03F3F +DATA 4, CCM_CCGR1, 0x0030FC03 +DATA 4, CCM_CCGR2, 0x0FFFC000 +DATA 4, CCM_CCGR3, 0x3FF00000 +DATA 4, CCM_CCGR4, 0x00FFF300 +DATA 4, CCM_CCGR5, 0x0F0000C3 +DATA 4, CCM_CCGR6, 0x000003FF + +/* enable AXI cache for VDOA/VPU/IPU */ +DATA 4, MX6_IOMUXC_GPR4, 0xF00000CF +/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ +DATA 4, MX6_IOMUXC_GPR6, 0x007F007F +DATA 4, MX6_IOMUXC_GPR7, 0x007F007F + +/* + * Setup CCM_CCOSR register as follows: + * + * cko1_en = 1 --> CKO1 enabled + * cko1_div = 111 --> divide by 8 + * cko1_sel = 1011 --> ahb_clk_root + * + * This sets CKO1 at ahb_clk_root/8 = 132/8 = 16.5 MHz + */ +DATA 4, CCM_CCOSR, 0x000000fb
board/solidrun/mx6-microsom/ddr-800mhz-32bit-setup.cfg new file +76 -0
76 lines not on this page · raw message
boards.cfg +1 -0
@@ -303,6 +303,7 @@ Active arm armv7 mx6 freescale mx6sabresd Active arm armv7 mx6 freescale mx6sabresd mx6qsabresd mx6sabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q Fabio Estevam <[email protected]> Active arm armv7 mx6 freescale mx6slevk mx6slevk mx6slevk:IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL Fabio Estevam <[email protected]> Active arm armv7 mx6 barco titanium titanium titanium:IMX_CONFIG=board/barco/titanium/imximage.cfg Stefan Roese <[email protected]> +Active arm armv7 mx6 solidrun hummingboard hummingboard_solo hummingboard:IMX_CONFIG=board/solidrun/hummingboard/solo.cfg,MX6S,DDR_MB=512 Jon Nettleton <[email protected]> Active arm armv7 omap3 - overo omap3_overo - Steve Sakoman <[email protected]> Active arm armv7 omap3 - pandora omap3_pandora - Grazvydas Ignotas <[email protected]> Active arm armv7 omap3 8dtech eco5pk eco5pk - Raphael Assenat <[email protected]>
include/configs/hummingboard.h new file +226 -0
226 lines not on this page · raw message
Signature · 1 line
1.8.1.2
Fabio Estevam
reviewerPATCH v2 2/3 mx6: Add initial support for the Hummingboard solo
Hi Stefano,
Quoted 11 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
SolidRun has designed the Hummingboard board based on mx6q/dl/solo.
Add the initial support for the mx6 solo variant.
More information about this hardware can be found at:
http://imx.solid-run.com/wiki/index.php?title=Carrier-One_Hardware(Carrier-One was the previous name of Hummingboard).
Quoted 7 lines
Based on the work from Jon Nettleton <[email protected]>.
Signed-off-by Jon Nettleton <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Addressed many of Stefano's comments about v1
Please let me know if you are happy with v2.
Thanks,
Fabio Estevam
PATCH v2 2/3 mx6: Add initial support for the Hummingboard solo
Hi Fabio,
Quoted 16 lines · Fabio Estevam
Hi Stefano,
Quoted 13 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
SolidRun has designed the Hummingboard board based on mx6q/dl/solo.
Add the initial support for the mx6 solo variant.
More information about this hardware can be found at:
http://imx.solid-run.com/wiki/index.php?title=Carrier-One_Hardware(Carrier-One was the previous name of Hummingboard).
Based on the work from Jon Nettleton <[email protected]>.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Jon Nettleton <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Addressed many of Stefano's comments about v1Please let me know if you are happy with v2.
I have not open issue with your patch - it looks great to me.
Best regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 =====================================================================
PATCH v2 2/3 mx6: Add initial support for the Hummingboard solo
Hi Fbio, hi Joe,
Quoted 25 lines · Stefano Babic
Hi Fabio,
Quoted 22 lines · Fabio Estevam
Hi Stefano,
Quoted 18 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
SolidRun has designed the Hummingboard board based on mx6q/dl/solo.
Add the initial support for the mx6 solo variant.
More information about this hardware can be found at:
http://imx.solid-run.com/wiki/index.php?title=Carrier-One_Hardware(Carrier-One was the previous name of Hummingboard).
Based on the work from Jon Nettleton <[email protected]>.
Signed-off-by Jon Nettleton <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Addressed many of Stefano's comments about v1
Quoted 5 lines
Quoted 2 lines
Please let me know if you are happy with v2.
I have not open issue with your patch - it looks great to me.
I discussed last week via IIRC with Otavio about if the patch can still flow into the coming release. He pointed me out that the original patch was sent a lot of time ago as "carrier-one":
http://patchwork.ozlabs.org/patch/288017/
I could then consider your patch as a resubmit of the original patch and push it to -master, it does not matter if the subject was changed. The patch itself is not dangerous at all for other boards, so we are running on the safest way.
However, it makes sense only if patch3/3 will be applied by Joe in the current release.
http://patchwork.ozlabs.org/patch/306640/
Joe, do you plan to apply it for this release or is it already deferred to -next ?
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 =====================================================================
Fabio Estevam
reviewerPATCH v2 2/3 mx6: Add initial support for the Hummingboard solo
Hi Stefano,
Quoted 10 lines · Stefano Babic
I discussed last week via IIRC with Otavio about if the patch can still flow into the coming release. He pointed me out that the original patch was sent a lot of time ago as "carrier-one":
http://patchwork.ozlabs.org/patch/288017/
I could then consider your patch as a resubmit of the original patch and push it to -master, it does not matter if the subject was changed. The patch itself is not dangerous at all for other boards, so we are running on the safest way.
That would be excellent, thanks.
Quoted 8 lines
However, it makes sense only if patch3/3 will be applied by Joe in the current release.
http://patchwork.ozlabs.org/patch/306640/Joe, do you plan to apply it for this release or is it already deferred to -next ?
Hopefully Joe can apply it for the upcoming release.
Regards,
Fabio Estevam
PATCH v2 2/3 mx6: Add initial support for the Hummingboard solo
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
SolidRun has designed the Hummingboard board based on mx6q/dl/solo.
Add the initial support for the mx6 solo variant.
More information about this hardware can be found at:
http://imx.solid-run.com/wiki/index.php?title=Carrier-One_Hardware
Quoted 7 lines
(Carrier-One was the previous name of Hummingboard).
Based on the work from Jon Nettleton <[email protected]>.
Signed-off-by Jon Nettleton <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 =====================================================================
Fabio Estevam
reviewerPATCH v2 3/3 net: phy: atheros: Fix the masks for AR8031/8035
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Use the same masks as used in the kernel:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/phy/at803x.c?id=refs/tags/v3.12.6
With such changes Ethernet is functional on hummingboard solo.
---
Changes since v1:
- No changes
drivers/net/phy/atheros.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/phy/atheros.c +2 -2
@@ -50,7 +50,7 @@ static struct phy_driver AR8021_driver = {static struct phy_driver AR8031_driver = { .name ="AR8031" , .uid =0x4dd074 , - .mask =0xfffff0 , + .mask =0xffffffef , .features =PHY_GBIT_FEATURES , .config = genphy_config, .startup = genphy_startup,
@@ -60,7 +60,7 @@ static struct phy_driver AR8031_driver = {static struct phy_driver AR8035_driver = { .name ="AR8035" , .uid =0x4dd072 , - .mask =0x4fffff , + .mask =0xffffffef , .features =PHY_GBIT_FEATURES , .config = ar8035_config, .startup = genphy_startup,
Signature · 1 line
1.8.1.2
Fabio Estevam
reviewerPATCH v2 3/3 net: phy: atheros: Fix the masks for AR8031/8035
Hi Joe,
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Use the same masks as used in the kernel:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/phy/at803x.c?id=refs/tags/v3.12.6With such changes Ethernet is functional on hummingboard solo.
Cc Joe Hershberger <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Acked-by Stefano Babic <[email protected]>
Any chance of getting this patch for 2014.01?
Thanks,
Fabio Estevam
PATCH v2 3/3 net: phy: atheros: Fix the masks for AR8031/8035
Quoted 8 lines · Fabio Estevam
Hi Joe,
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Use the same masks as used in the kernel:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/phy/at803x.c?id=refs/tags/v3.12.6
Quoted 7 lines
Quoted 5 lines
With such changes Ethernet is functional on hummingboard solo.
Cc Joe Hershberger <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Acked-by Stefano Babic <[email protected]>Any chance of getting this patch for 2014.01?
Yes, I'll send the pull request shortly.
-Joe
PATCH v2 3/3 net: phy: atheros: Fix the masks for AR8031/8035
Hi Joe,
Quoted 11 lines · Joe Hershberger
Quoted 10 lines · Fabio Estevam
Hi Joe,
Quoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Use the same masks as used in the kernel:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/phy/at803x.c?id=refs/tags/v3.12.6With such changes Ethernet is functional on hummingboard solo.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Cc Joe Hershberger <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Acked-by Stefano Babic <[email protected]>Any chance of getting this patch for 2014.01?
Yes, I'll send the pull request shortly.
Thanks - then I will pick up the Hummingbird's patches, too.
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 =====================================================================
PATCH v2 1/3 mx6: clock: Pass the frequency as argument of enable_fec_anatop_clock()
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Provide an argument to
enable_fec_anatop_clock()to specify the clock frequency that will be generated.No changes are made to mx6slevk, which uses the default 50MHz fec clock.
Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 =====================================================================