mx6cuboxi: Add HDMI output support
PATCH v2 1/4 mx6cuboxi: Add HDMI output support
From: Fabio Estevam <[email protected]>
Add HDMI output using PLL5 as the source for the IPU clocks, and accurate VESA timings.
These settings are based on the patch from Soeren Moch <[email protected]> submitted for the tbs2910 mx6 based board.
It allows the display to work properly at 1024x768 at 60.
This should make the hdmi output signal compatible with most if not all modern displays.
---
Changes since v1:
- None
board/solidrun/mx6cuboxi/mx6cuboxi.c | 101 ++++++++++++++++++++++++++++++++++- include/configs/mx6cuboxi.h | 18 ++++++- 2 files changed, 117 insertions(+), 2 deletions(-)
board/solidrun/mx6cuboxi/mx6cuboxi.c +100 -1
@@ -18,9 +18,11 @@#include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> #include <asm/arch/mx6-pins.h> +#include <asm/arch/mxc_hdmi.h> #include <asm/errno.h> #include <asm/gpio.h> #include <asm/imx-common/iomux-v3.h> +#include <asm/imx-common/video.h> #include <mmc.h> #include <fsl_esdhc.h> #include <miiphy.h>
@@ -159,10 +161,107 @@ int board_eth_init(bd_t *bis)return cpu_eth_init (bis); } +#ifdef CONFIG_VIDEO_IPUV3 +static void do_enable_hdmi (struct display_info_t const *dev) +{ +imx_enable_hdmi_phy (); +} + +struct display_info_t const displays[] = { + { + .bus =-1 , + .addr =0 , + .pixfmt =IPU_PIX_FMT_RGB24 , + .detect = detect_hdmi, + .enable = do_enable_hdmi, + .mode = { + .name ="HDMI" , +/* 1024x768 at 60Hz (VESA)*/ + .refresh =60 , + .xres =1024 , + .yres =768 , + .pixclock =15384 , + .left_margin =160 , + .right_margin =24 , + .upper_margin =29 , + .lower_margin =3 , + .hsync_len =136 , + .vsync_len =6 , + .sync =FB_SYNC_EXT , + .vmode =FB_VMODE_NONINTERLACED + } + } +}; + +size_t display_count =ARRAY_SIZE (displays); + +static int setup_display (void ) +{ +struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR ; +int reg; +int timeout =100000 ; + +enable_ipu_clock (); +imx_setup_hdmi (); + +/* set video pll to 455MHz (24MHz * (37+11/12) / 2) */ +setbits_le32 (&ccm->analog_pll_video,BM_ANADIG_PLL_VIDEO_POWERDOWN ); + + reg =readl (&ccm->analog_pll_video); + reg &= ~BM_ANADIG_PLL_VIDEO_DIV_SELECT ; + reg |=BF_ANADIG_PLL_VIDEO_DIV_SELECT (37 ); + reg &= ~BM_ANADIG_PLL_VIDEO_POST_DIV_SELECT ; + reg |=BF_ANADIG_PLL_VIDEO_POST_DIV_SELECT (1 ); +writel (reg, &ccm->analog_pll_video); + +writel (BF_ANADIG_PLL_VIDEO_NUM_A (11 ), &ccm->analog_pll_video_num); +writel (BF_ANADIG_PLL_VIDEO_DENOM_B (12 ), &ccm->analog_pll_video_denom); + + reg &= ~BM_ANADIG_PLL_VIDEO_POWERDOWN ; +writel (reg, &ccm->analog_pll_video); + +while (timeout--) +if (readl (&ccm->analog_pll_video) &BM_ANADIG_PLL_VIDEO_LOCK ) +break ; +if (timeout <0 ) { +printf ("Warning: video pll lock timeout!\n" ); +return -ETIMEDOUT ; + } + + reg =readl (&ccm->analog_pll_video); + reg |=BM_ANADIG_PLL_VIDEO_ENABLE ; + reg &= ~BM_ANADIG_PLL_VIDEO_BYPASS ; +writel (reg, &ccm->analog_pll_video); + +/* gate ipu1_di0_clk */ +clrbits_le32 (&ccm->CCGR3,MXC_CCM_CCGR3_LDB_DI0_MASK ); + +/* select video_pll clock / 7 for ipu1_di0_clk -> 65MHz pixclock */ + reg =readl (&ccm->chsccdr); + reg &= ~(MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK | +MXC_CCM_CHSCCDR_IPU1_DI0_PODF_MASK | +MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_MASK ); + reg |= (2 <<MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_OFFSET ) | + (6 <<MXC_CCM_CHSCCDR_IPU1_DI0_PODF_OFFSET ) | + (0 <<MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET ); +writel (reg, &ccm->chsccdr); + +/* enable ipu1_di0_clk */ +setbits_le32 (&ccm->CCGR3,MXC_CCM_CCGR3_LDB_DI0_MASK ); + +return 0 ; +} +#endif /* CONFIG_VIDEO_IPUV3 */ +int board_early_init_f (void ) { +int ret =0 ;setup_iomux_uart (); -return 0 ; + +#ifdef CONFIG_VIDEO_IPUV3 + ret =setup_display (); +#endif +return ret; }int board_init (void )
include/configs/mx6cuboxi.h +17 -1
@@ -27,7 +27,7 @@#define CONFIG_IMX6_THERMAL #define CONFIG_SYS_GENERIC_BOARD -#define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M) +#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)#define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO
@@ -66,6 +66,22 @@#define CONFIG_CONS_INDEX 1#define CONFIG_BAUDRATE 115200 +/* Framebuffer */ +#define CONFIG_VIDEO +#define CONFIG_VIDEO_IPUV3 +#define CONFIG_IPUV3_CLK 260000000 +#define CONFIG_CFB_CONSOLE +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN +#define CONFIG_BMP_16BPP +#define CONFIG_VIDEO_LOGO +#define CONFIG_VIDEO_BMP_LOGO +#define CONFIG_IMX_HDMI +#define CONFIG_IMX_VIDEO_SKIP +#define CONFIG_SYS_NO_FLASH /* Command definition */
Signature · 1 line
1.9.1
PATCH v2 2/4 mx6cuboxi: Add USB host support
From: Fabio Estevam <[email protected]>
Enable USB Host1 port.
---
Changes since v1:
- Remove USB ether options as suggested by Tom
board/solidrun/mx6cuboxi/mx6cuboxi.c | 26 ++++++++++++++++++++++++++ include/configs/mx6cuboxi.h | 10 ++++++++++ 2 files changed, 36 insertions(+)
board/solidrun/mx6cuboxi/mx6cuboxi.c +26 -0
@@ -31,6 +31,8 @@#include <asm/io.h> #include <asm/arch/sys_proto.h> #include <spl.h> +#include <usb.h> +#include <usb/ehci-fsl.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -52,6 +54,7 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)#define ETH_PHY_RESET IMX_GPIO_NR(4, 15) +#define USB_H1_VBUS IMX_GPIO_NR(1, 0)int dram_init (void ) {
@@ -79,6 +82,10 @@ static iomux_v3_cfg_t const hb_cbi_sense[] = { IOMUX_PADS(PAD_EIM_DA4__GPIO3_IO04 | MUX_PAD_CTRL(UART_PAD_CTRL)), }; +static iomux_v3_cfg_t const usb_pads[] = { +IOMUX_PADS (PAD_GPIO_0__GPIO1_IO00 |MUX_PAD_CTRL (NO_PAD_CTRL )), +}; +static void setup_iomux_uart (void ) {SETUP_IOMUX_PADS (uart1_pads);
@@ -253,6 +260,21 @@ static int setup_display(void) }#endif /* CONFIG_VIDEO_IPUV3 */ +#ifdef CONFIG_USB_EHCI_MX6 +static void setup_usb (void ) +{ +SETUP_IOMUX_PADS (usb_pads); +} + +int board_ehci_hcd_init (int port) +{ +if (port ==1 ) +gpio_direction_output (USB_H1_VBUS ,1 ); + +return 0 ; +} +#endif +int board_early_init_f (void ) {int ret =0 ;
@@ -261,6 +283,10 @@ int board_early_init_f(void)#ifdef CONFIG_VIDEO_IPUV3 ret =setup_display ();#endif + +#ifdef CONFIG_USB_EHCI_MX6 +setup_usb (); +#endif return ret; }
include/configs/mx6cuboxi.h +10 -0
@@ -82,6 +82,16 @@#define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP +/* USB */ +#define CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MX6 +#define CONFIG_USB_STORAGE +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +#define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#define CONFIG_SYS_NO_FLASH /* Command definition */
Signature · 1 line
1.9.1
PATCH v2 2/4 mx6cuboxi: Add USB host support
Quoted 7 lines · Fabio Estevam
Enable USB Host1 port.
Signed-off-by Rabeeh Khoury <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Remove USB ether options as suggested by Tom
Removing those options broke network boot. With this patch, u-boot reports:
Net: Phy 0 not found
And the dhcp command fails to get an ip address.
With both CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX defined in mx6cuboxi.h, u-boot reports:
Net: FEC
And then the dhcp command works as expected...
Perhaps the CONFIG_USB*ETHER options conditionall enable some other feature that FEC depends on?
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150430/54f446f3/attachment.sig>
PATCH v2 2/4 mx6cuboxi: Add USB host support
Quoted 10 lines · Vagrant Cascadian
Removing those options broke network boot. With this patch, u-boot reports:
Net: Phy 0 not found
And the dhcp command fails to get an ip address.
With both
CONFIG_USB_HOST_ETHERandCONFIG_USB_ETHER_ASIXdefined inmx6cuboxi.h, u-boot reports:
Quoted 6 lines
Net: FEC
And then the dhcp command works as expected...
Perhaps the CONFIG_USB*ETHER options conditionall enable some other feature that FEC depends on?
Could you try?
=> setenv ethaddr
=> save
=> reset
TFTP transfer is working fine here.
Regards,
Fabio Estevam
PATCH v2 2/4 mx6cuboxi: Add USB host support
Quoted 12 lines · Fabio Estevam
Quoted 10 lines · Vagrant Cascadian
Removing those options broke network boot. With this patch, u-boot reports:
Net: Phy 0 not found
And the dhcp command fails to get an ip address.
With both
CONFIG_USB_HOST_ETHERandCONFIG_USB_ETHER_ASIXdefined inmx6cuboxi.h, u-boot reports:
Quoted 6 lines
Quoted 6 lines
Net: FEC
And then the dhcp command works as expected...
Perhaps the CONFIG_USB*ETHER options conditionall enable some other feature that FEC depends on?
After trying this several times, that build of u-boot no longer works either.
Quoted 5 lines
Could you try?
=> setenv ethaddr
=> save
=> reset
No change.
Quoted 1 line
TFTP transfer is working fine here.
It was working here too, and now it doesn't. I clearly misdiagnosed the cause...
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150430/a584c7e4/attachment.sig>
PATCH v2 2/4 mx6cuboxi: Add USB host support
So network works fine on the hummingboard i1 and i2ex, but the cubox i4pro is still inconsistant:
Net: Phy 0 not found
PHY reset timed out
FEC
It definitely worked at some point before. I used the same SD card on all three boards.
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150430/67111cbb/attachment.sig>
PATCH v2 2/4 mx6cuboxi: Add USB host support
Hi Vagrant,
Quoted 6 lines · Vagrant Cascadian
So network works fine on the hummingboard i1 and i2ex, but the cubox i4pro is still inconsistant:
Net: Phy 0 not found
PHY reset timed out
FEC
When you see this error: does U-boot warn you about the MAC address stored in the environment does not match the one read by the fuses?
I think if you use a clean environment (env default -f -a, or do the setenv ethaddr; save) then the MAC address will be re-read from the fuse and stored in the env. Then ethernet should work fine.
Regards,
Fabio Estevam
PATCH v2 2/4 mx6cuboxi: Add USB host support
Quoted 10 lines · Fabio Estevam
Quoted 6 lines · Vagrant Cascadian
So network works fine on the hummingboard i1 and i2ex, but the cubox i4pro is still inconsistant:
Net: Phy 0 not found
PHY reset timed out
FECWhen you see this error: does U-boot warn you about the MAC address stored in the environment does not match the one read by the fuses?
No such warning. Rather than keep you guessing, here's the output on boot:
U-Boot 2015.04+dfsg1-2~20150430~5 (Apr 30 2015 - 20:46:44)
CPU: Freescale i.MX6Q rev1.2 at 792 MHz CPU: Temperature 17 C Reset cause: POR Board: MX6 Cubox-i DRAM: 2 GiB MMC: FSL_SDHC: 0
*** Warning - bad CRC, using default environment
No panel detected: default to HDMI Display: HDMI (1024x768) In: serial Out: vga Err: vga Net: Phy 0 not found PHY reset timed out FEC starting USB... USB0: Port not available. USB1: USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found
Hit any key to stop autoboot: 0
Quoted 1 line
I think if you use a clean environment (env default -f -a
Running "env default -f -a" resets the environment and clears out ethaddr (as well as board_name and board_rev, which can be tricky for findfdt), though I believe it is already using the default environment because of the message:
*** Warning - bad CRC, using default environment
But it doesn't really help with the ethernet changes.
Quoted 2 lines
or do the setenv ethaddr; save) then the MAC address will be re-read from the fuse and stored in the env. Then ethernet should work fine.
I'm guessing you mean "saveenv" and not "save".
"setenv ethaddr; saveenv ; reset" still fails to work.
I generally try to avoid using saveenv as it makes it harder to test the default environment when testing a new version of u-boot.
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150430/ec22f743/attachment.sig>
PATCH v2 2/4 mx6cuboxi: Add USB host support
Hi Vagrant,
Quoted 3 lines · Vagrant Cascadian
Net: Phy 0 not found
PHY reset timed out
FEC
ok, the PHY is not found, but I cannot understand how Fabio's changes dropping ASIX can be the cause. Have you reverted back U-Boot to V1 set of patchset to check again if it works ? It looks a completely unrelated cause.
Best regards,
Stefano Babic
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: sbabic at denx.de =====================================================================
PATCH v2 2/4 mx6cuboxi: Add USB host support
Quoted 4 lines · Stefano Babic
Hi Vagrant,
On 01/05/2015 07:50, Vagrant Cascadian wrote:
Quoted 8 lines
Quoted 3 lines
Net: Phy 0 not found
PHY reset timed out
FECok, the PHY is not found, but I cannot understand how Fabio's changes dropping ASIX can be the cause. Have you reverted back U-Boot to V1 set of patchset to check again if it works ? It looks a completely unrelated cause.
Yes, this is something I did not understand as well.
Vagrant, could you confirm that v1 did not have this FEC issue?
Thanks
PATCH v2 2/4 mx6cuboxi: Add USB host support
In reply to Stefano BabicQuoted 10 lines · Stefano Babic
Quoted 3 lines · Vagrant Cascadian
Net: Phy 0 not found
PHY reset timed out
FECok, the PHY is not found, but I cannot understand how Fabio's changes dropping ASIX can be the cause. Have you reverted back U-Boot to V1 set of patchset to check again if it works ? It looks a completely unrelated cause.
I did revert back, and at first that seemed to fix it, but after more testing, the issue appears to be intermittent, and unrelated to the USB changes.
So my earlier Tested-By stands; I think it's worth applying.
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150501/b740903c/attachment.sig>
PATCH v2 2/4 mx6cuboxi: Add USB host support
Quoted 5 lines · Vagrant Cascadian
I did revert back, and at first that seemed to fix it, but after more testing, the issue appears to be intermittent, and unrelated to the USB changes.
So my earlier Tested-By stands; I think it's worth applying.
Ok, thanks for the clarification.
I will try to reproduce/investigate this FEC/PHY issue next week.
Regards,
Fabio Estevam
PATCH v2 2/4 mx6cuboxi: Add USB host support
Quoted 11 lines · Fabio Estevam
Quoted 5 lines · Vagrant Cascadian
I did revert back, and at first that seemed to fix it, but after more testing, the issue appears to be intermittent, and unrelated to the USB changes.
So my earlier Tested-By stands; I think it's worth applying.
Ok, thanks for the clarification.
I will try to reproduce/investigate this FEC/PHY issue next week.
Looking at Solid-run's tree they have the following commit that may be related to this PHY issue:
commit efc4835294122212052a8b8b2a23d14fa2b72177
Author: Rabeeh Khoury <[email protected]> Date: Sat Jan 25 17:57:51 2014 +0200
fecmxc_initialize_multi change from phy id to phy mask
The fecmxc_initialize_multi now accepts phy address mask instead of a single phy address.
Modified otherboard that directly uses fecmxc_initialize_multi()
Modified also i.MX6 RXD0/RXD1 pad to pull down (they are also directly connected to the Atheros 8035/8030 although they should be functional only in the RMII mode - 8030).
PATCH v2 2/4 mx6cuboxi: Add USB host support
Vagrant,
Quoted 2 lines · Fabio Estevam
Looking at Solid-run's tree they have the following commit that may be related to this PHY issue:
I applied Rabeeh's patch on top of this v2 series and generated the two attached patches.
Could you please give them a try and let us know if it fixes the Ethernet PHY detect issue?
Regards,
Fabio Estevam
-------------- next part --------------
[U-Boot] mx6cuboxi: PHY/FEC detection
Quoted 10 lines · Fabio Estevam
Quoted 2 lines · Fabio Estevam
Looking at Solid-run's tree they have the following commit that may be related to this PHY issue:
I applied Rabeeh's patch on top of this v2 series and generated the two attached patches.
Could you please give them a try and let us know if it fixes the Ethernet PHY detect issue?
After some brief testing with these two patches, it seems to be working. After trying various methods (cold boot, reset from u-boot prompt several consecutive times, reboot from linux several times), it seems to consistantly detect the PHY.
Thanks for looking into it!
live well,
vagrant
Quoted 213 lines
From
c0078a4fe907f8c579924f89ee5ac48e40d84736Mon Sep 17 00:00:00 2001
From: Fabio Estevam <[email protected]>
Date: Fri, 1 May 2015 18:09:30 -0300
Subject: [PATCH 1/2] fec: Allow passing a phy mask infecmxc_initialize_multi()Instead of only accepting a fixed PHY address, allow passing a range of PHY addresses through a mask address.
Signed-off-by Rabeeh Khoury <[email protected]>Signed-off-by Fabio Estevam <[email protected]>--- board/denx/m28evk/m28evk.c | 4 ++-- board/freescale/mx28evk/mx28evk.c | 4 ++-- board/schulercontrol/sc_sps_1/sc_sps_1.c | 4 ++-- drivers/net/fec_mxc.c | 10 +++++----- include/netdev.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-)board/denx/m28evk/m28evk.c +2
-2@@ -131,13 +131,13 @@ int board_eth_init(bd_t *bis)udelay (10000 );#endif - ret =fecmxc_initialize_multi (bis,0 ,0 ,MXS_ENET0_BASE ); + ret =fecmxc_initialize_multi (bis,0 ,1 <<0 ,MXS_ENET0_BASE );if (ret) {printf ("FEC MXS: Unable to init FEC0\n" );return ret; } - ret =fecmxc_initialize_multi (bis,1 ,3 ,MXS_ENET1_BASE ); + ret =fecmxc_initialize_multi (bis,1 ,1 <<3 ,MXS_ENET1_BASE );if (ret) {printf ("FEC MXS: Unable to init FEC1\n" );return ret;board/freescale/mx28evk/mx28evk.c +2
-2@@ -118,13 +118,13 @@ int board_eth_init(bd_t *bis)udelay (200 );gpio_set_value (MX28_PAD_ENET0_RX_CLK__GPIO_4_13 ,1 ); - ret =fecmxc_initialize_multi (bis,0 ,0 ,MXS_ENET0_BASE ); + ret =fecmxc_initialize_multi (bis,0 ,1 <<0 ,MXS_ENET0_BASE );if (ret) {puts ("FEC MXS: Unable to init FEC0\n" );return ret; } - ret =fecmxc_initialize_multi (bis,1 ,3 ,MXS_ENET1_BASE ); + ret =fecmxc_initialize_multi (bis,1 ,1 <<3 ,MXS_ENET1_BASE );if (ret) {puts ("FEC MXS: Unable to init FEC1\n" );return ret;board/schulercontrol/sc_sps_1/sc_sps_1.c +2
-2@@ -79,13 +79,13 @@ int board_eth_init(bd_t *bis)CLKCTRL_ENET_TIME_SEL_MASK , CLKCTRL_ENET_TIME_SEL_RMII_CLK | CLKCTRL_ENET_CLK_OUT_EN); - ret =fecmxc_initialize_multi (bis,0 ,0 ,MXS_ENET0_BASE ); + ret =fecmxc_initialize_multi (bis,0 ,1 <<0 ,MXS_ENET0_BASE );if (ret) {printf ("FEC MXS: Unable to init FEC0\n" );return ret; } - ret =fecmxc_initialize_multi (bis,1 ,1 ,MXS_ENET1_BASE ); + ret =fecmxc_initialize_multi (bis,1 ,1 <<1 ,MXS_ENET1_BASE );if (ret) {printf ("FEC MXS: Unable to init FEC1\n" );return ret;drivers/net/fec_mxc.c +5
-5@@ -1077,7 +1077,7 @@ struct mii_dev *fec_get_miibus(uint32_t base_addr, int dev_id)return bus; } -int fecmxc_initialize_multi (bd_t *bd,int dev_id,int phy_id,uint32_t addr) +int fecmxc_initialize_multi (bd_t *bd,int dev_id,uint32_t phy_mask,uint32_t addr) {uint32_t base_mii;struct mii_dev *bus =NULL ;@@ -1095,19 +1095,19 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)#else base_mii = addr;#endif -debug ("eth_init: fec_probe(bd, %i, %i) @ %08x\n" , dev_id, phy_id, addr); +debug ("eth_init: fec_probe(bd, %i, %i) @ %08x\n" , dev_id, phy_mask, addr); bus =fec_get_miibus (base_mii, dev_id);if (!bus)return -ENOMEM ;#ifdef CONFIG_PHYLIB - phydev =phy_find_by_mask (bus,1 << phy_id,PHY_INTERFACE_MODE_RGMII ); + phydev =phy_find_by_mask (bus, phy_mask,PHY_INTERFACE_MODE_RGMII );if (!phydev) {free (bus);return -ENOMEM ; } ret =fec_probe (bd, dev_id, addr, bus, phydev);#else - ret =fec_probe (bd, dev_id, addr, bus, phy_id); + ret =fec_probe (bd, dev_id, addr, bus, phy_mask);#endif if (ret) {#ifdef CONFIG_PHYLIB @@ -1121,7 +1121,7 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)#ifdef CONFIG_FEC_MXC_PHYADDR int fecmxc_initialize (bd_t *bd) { -return fecmxc_initialize_multi (bd,-1 ,CONFIG_FEC_MXC_PHYADDR , +return fecmxc_initialize_multi (bd,-1 ,1 <<CONFIG_FEC_MXC_PHYADDR ,IMX_FEC_BASE ); }#endif include/netdev.h +1
-1@@ -49,7 +49,7 @@ int eth_3com_initialize (bd_t * bis);int ethoc_initialize (u8 dev_num,int base_addr);int fec_initialize (bd_t *bis);int fecmxc_initialize (bd_t *bis); -int fecmxc_initialize_multi (bd_t *bis,int dev_id,int phy_id,uint32_t addr); +int fecmxc_initialize_multi (bd_t *bis,int dev_id,uint32_t phy_mask,uint32_t addr);int ftgmac100_initialize (bd_t *bits);int ftmac100_initialize (bd_t *bits);int ftmac110_initialize (bd_t *bits);Signature · 27 lines
1.9.1 From cc3a6625a4ddab8943c8d66f5dd0aac651e7c5e5 Mon Sep 17 00:00:00 2001 From: Fabio Estevam <[email protected]> Date: Fri, 1 May 2015 18:16:13 -0300 Subject: [PATCH 2/2] mx6cuboxi: Fix Ethernet PHY undetected problem mx6cuboxi sometimes fails to recognize the Ethernet PHY: Net: Phy 0 not found The explanation comes from a patch from Rabeeh: "Initialize the phy in address 0x0 or 0x4 (0x11 phy mask). The LED_ACT pin on the carrier-one boards had a pull down that forces the phy address to 0x0; where on CuBox-i and the production HummingBoard that pin is connected directly to LED that depending on the pull down strength of the LED it might be sampled as '0' or '1' thus the phy address might appear as either address 0x0 or 0x4." Reported-by: Vagrant Cascadian <[email protected]> Signed-off-by: Rabeeh Khoury <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> --- board/solidrun/mx6cuboxi/mx6cuboxi.c | 16 ++++++++++++++++ include/configs/mx6cuboxi.h | 1 - 2 files changed, 16 insertions(+), 1 deletion(-)board/solidrun/mx6cuboxi/mx6cuboxi.c +16
-0@@ -133,6 +133,8 @@ static iomux_v3_cfg_t const enet_pads[] = {IOMUX_PADS (PAD_RGMII_RD2__RGMII_RD2 |MUX_PAD_CTRL (ENET_PAD_CTRL )),IOMUX_PADS (PAD_RGMII_RD3__RGMII_RD3 |MUX_PAD_CTRL (ENET_PAD_CTRL )),IOMUX_PADS (PAD_RGMII_RX_CTL__RGMII_RX_CTL |MUX_PAD_CTRL (ENET_PAD_CTRL_PD )), +IOMUX_PADS (PAD_ENET_RXD0__GPIO1_IO27 |MUX_PAD_CTRL (ENET_PAD_CTRL_PD )), + IOMUX_PADS(PAD_ENET_RXD1__GPIO1_IO26 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD)), };static void setup_iomux_enet (void )@@ -144,6 +146,20 @@ static void setup_iomux_enet(void)gpio_set_value (ETH_PHY_RESET ,1 ); } +int fecmxc_initialize (bd_t *bd) +{ +/* +* Initialize the phy in address 0x0 or 0x4 (0x11 phy mask). +* The LED_ACT pin on the carrier-one boards had a pull down that +* forces the phy address to 0x0; where on CuBox-i and the production +* HummingBoard that pin is connected directly to LED that depending +* on the pull down strength of the LED it might be sampled +* as '0' or '1' thus the phy address might appear as either address +* 0x0 or 0x4. +*/ +return fecmxc_initialize_multi (bd,-1 ,0x11 ,IMX_FEC_BASE ); +} +int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)include/configs/mx6cuboxi.h +0
-1@@ -57,7 +57,6 @@#define CONFIG_MII #define IMX_FEC_BASE ENET_BASE_ADDR#define CONFIG_FEC_XCV_TYPE RGMII -#define CONFIG_FEC_MXC_PHYADDR 0#define CONFIG_PHYLIB #define CONFIG_PHY_ATHEROS Signature · 1 line
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150501/1d9d4b3d/attachment.sig>
[U-Boot] mx6cuboxi: PHY/FEC detection
Hi Fabio, Vagrant,
Quoted 9 lines · Vagrant Cascadian
Quoted 8 lines · Fabio Estevam
Quoted 2 lines · Fabio Estevam
Looking at Solid-run's tree they have the following commit that may be related to this PHY issue:
I applied Rabeeh's patch on top of this v2 series and generated the two attached patches.
Quoted 8 lines
Quoted 2 lines
Could you please give them a try and let us know if it fixes the Ethernet PHY detect issue?
After some brief testing with these two patches, it seems to be working. After trying various methods (cold boot, reset from u-boot prompt several consecutive times, reboot from linux several times), it seems to consistantly detect the PHY.
Good work ! I apply V2, then. Can you also send to a ML the two additional patches from your previous e-mail ? They are not tracked properly by patchwork.
Thanks,
Stefano
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: sbabic at denx.de =====================================================================
[U-Boot] mx6cuboxi: PHY/FEC detection
Hi Stefano and Vagrant,
Quoted 3 lines · Stefano Babic
Good work ! I apply V2, then. Can you also send to a ML the two additional patches from your previous e-mail ? They are not tracked properly by patchwork.
Thanks for testing the patches, Vagrant.
I will submit them to the list next week after testing on a mx28evk. Just want to make sure FEC still works fine on that platform as well.
Regards,
Fabio Estevam
[U-Boot] mx6cuboxi: PHY/FEC detection
Quoted 4 lines · Fabio Estevam
Hi Stefano and Vagrant,
On Sat, May 2, 2015 at 5:54 AM, Stefano Babic <[email protected]> wrote:
Quoted 8 lines
Quoted 3 lines
Good work ! I apply V2, then. Can you also send to a ML the two additional patches from your previous e-mail ? They are not tracked properly by patchwork.
Thanks for testing the patches, Vagrant.
I will submit them to the list next week after testing on a mx28evk. Just want to make sure FEC still works fine on that platform as well.
After thinking more about these patches, there is no need to touch the fec driver for allowing the PHY to be probed at a different address. We have phy_find_by_mask(), which suits for this exact purpose, so I will send a patch using the existing infrastructure.
Regards,
Fabio Estevam
[U-Boot] mx6cuboxi: PHY/FEC detection
Quoted 11 lines · Fabio Estevam
Quoted 10 lines · Fabio Estevam
Hi Stefano and Vagrant,
Quoted 3 lines · Stefano Babic
Good work ! I apply V2, then. Can you also send to a ML the two additional patches from your previous e-mail ? They are not tracked properly by patchwork.
Thanks for testing the patches, Vagrant.
Quoted 8 lines
Quoted 2 lines
I will submit them to the list next week after testing on a mx28evk. Just want to make sure FEC still works fine on that platform as well.
After thinking more about these patches, there is no need to touch the fec driver for allowing the PHY to be probed at a different address. We have
phy_find_by_mask(), which suits for this exact purpose, so I will send a patch using the existing infrastructure.
You're right, this is the best approach.
Best regards,
Stefano Babic
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: sbabic at denx.de =====================================================================
PATCH v2 2/4 mx6cuboxi: Add USB host support
In reply to Fabio EstevamQuoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Enable USB Host1 port.
Signed-off-by Rabeeh Khoury <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Remove USB ether options as suggested by Tom
USB keyboard, USB hub and two USB sticks all worked.
Quoted 92 lines
board/solidrun/mx6cuboxi/mx6cuboxi.c | 26 ++++++++++++++++++++++++++ include/configs/mx6cuboxi.h | 10 ++++++++++ 2 files changed, 36 insertions(+)board/solidrun/mx6cuboxi/mx6cuboxi.c +26
-0@@ -31,6 +31,8 @@#include <asm/io.h> #include <asm/arch/sys_proto.h> #include <spl.h> +#include <usb.h> +#include <usb/ehci-fsl.h> DECLARE_GLOBAL_DATA_PTR ;@@ -52,6 +54,7 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)#define ETH_PHY_RESET IMX_GPIO_NR(4, 15) +#define USB_H1_VBUS IMX_GPIO_NR(1, 0)int dram_init (void ) {@@ -79,6 +82,10 @@ static iomux_v3_cfg_t const hb_cbi_sense[] = { IOMUX_PADS(PAD_EIM_DA4__GPIO3_IO04 | MUX_PAD_CTRL(UART_PAD_CTRL)), }; +static iomux_v3_cfg_t const usb_pads[] = { +IOMUX_PADS (PAD_GPIO_0__GPIO1_IO00 |MUX_PAD_CTRL (NO_PAD_CTRL )), +}; +static void setup_iomux_uart (void ) {SETUP_IOMUX_PADS (uart1_pads);@@ -253,6 +260,21 @@ static int setup_display(void) }#endif /* CONFIG_VIDEO_IPUV3 */ +#ifdef CONFIG_USB_EHCI_MX6 +static void setup_usb (void ) +{ +SETUP_IOMUX_PADS (usb_pads); +} + +int board_ehci_hcd_init (int port) +{ +if (port ==1 ) +gpio_direction_output (USB_H1_VBUS ,1 ); + +return 0 ; +} +#endif +int board_early_init_f (void ) {int ret =0 ;@@ -261,6 +283,10 @@ int board_early_init_f(void)#ifdef CONFIG_VIDEO_IPUV3 ret =setup_display ();#endif + +#ifdef CONFIG_USB_EHCI_MX6 +setup_usb (); +#endif return ret; }include/configs/mx6cuboxi.h +10
-0@@ -82,6 +82,16 @@#define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP +/* USB */ +#define CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MX6 +#define CONFIG_USB_STORAGE +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +#define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#define CONFIG_SYS_NO_FLASH /* Command definition */ Signature · 1 line
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150430/113c5c1b/attachment.sig>
PATCH v2 2/4 mx6cuboxi: Add USB host support
In reply to Fabio EstevamQuoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Enable USB Host1 port.
Signed-off-by Rabeeh Khoury <[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, 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 =====================================================================
PATCH v2 3/4 mx6cuboxi: Allow HDMI and USB keyboard to be stdout/stdin
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
There are users of Cuboxi and Hummingboard that use these boards without connecting them to a USB/serial adapter.
Allow such usage by allowing the HDMI port to act as stdout and USB keyboard as stdin.
The serial console still also works as stdin/stdout.
---
Changes since v1:
- None
include/configs/mx6cuboxi.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/configs/mx6cuboxi.h +7 -0
@@ -81,6 +81,7 @@#define CONFIG_VIDEO_BMP_LOGO #define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP +#define CONFIG_CONSOLE_MUX /* USB */ #define CONFIG_CMD_USB
@@ -91,6 +92,9 @@#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)#define CONFIG_MXC_USB_FLAGS 0#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#define CONFIG_USB_KEYBOARD +#define CONFIG_SYS_USB_EVENT_POLL +#define CONFIG_PREBOOT "usb start"#define CONFIG_SYS_NO_FLASH
@@ -113,6 +117,9 @@#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial,usbkbd\0" \ + "stdout=serial,vga\0" \ + "stderr=serial,vga\0" \ "script=boot.scr\0" \ "image=zImage\0" \ "fdtfile=undefined\0" \
Signature · 1 line
1.9.1
PATCH v2 3/4 mx6cuboxi: Allow HDMI and USB keyboard to be stdout/stdin
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
There are users of Cuboxi and Hummingboard that use these boards without connecting them to a USB/serial adapter.
Quoted 8 lines
Allow such usage by allowing the HDMI port to act as stdout and USB keyboard as stdin.
The serial console still also works as stdin/stdout.
Signed-off-by Rabeeh Khoury <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Tom Rini <[email protected]>
Quoted 41 lines
---
Changes since v1:
- Noneinclude/configs/mx6cuboxi.h | 7 +++++++ 1 file changed, 7 insertions(+)include/configs/mx6cuboxi.h +7
-0@@ -81,6 +81,7 @@#define CONFIG_VIDEO_BMP_LOGO #define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP +#define CONFIG_CONSOLE_MUX /* USB */ #define CONFIG_CMD_USB @@ -91,6 +92,9 @@#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)#define CONFIG_MXC_USB_FLAGS 0#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#define CONFIG_USB_KEYBOARD +#define CONFIG_SYS_USB_EVENT_POLL +#define CONFIG_PREBOOT "usb start"#define CONFIG_SYS_NO_FLASH @@ -113,6 +117,9 @@#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial,usbkbd\0" \ + "stdout=serial,vga\0" \ + "stderr=serial,vga\0" \ "script=boot.scr\0" \ "image=zImage\0" \ "fdtfile=undefined\0" \Signature · 1 line
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150430/acdf75bc/attachment.sig>
PATCH v2 3/4 mx6cuboxi: Allow HDMI and USB keyboard to be stdout/stdin
In reply to Fabio EstevamQuoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
There are users of Cuboxi and Hummingboard that use these boards without connecting them to a USB/serial adapter.
Allow such usage by allowing the HDMI port to act as stdout and USB keyboard as stdin.
Quoted 6 lines
The serial console still also works as stdin/stdout.
Signed-off-by Rabeeh Khoury <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Tom Rini <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
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: sbabic at denx.de =====================================================================
PATCH v2 4/4 logos: Add Solidrun's logo
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Let Solidrun's logo appear on Cuboxi and Hummingboard by default.
---
Changes since v1:
- None
tools/logos/solidrun.bmp | Bin 0 -> 5558 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tools/logos/solidrun.bmp
tools/logos/solidrun.bmp new file binary +0 -0
zcmeHK=~ool6~F8vXhV~NDFuaA0yaS!gMg at j*ai>~n*o(35h9{-n#IS^(25ISgES%# zR#_BKmasI<PB#N6lXEmPMl<7_OeQ&VP9S#KXR+8mts@DF!Lq%oPJgB-R<}8z3<lR zn50<>SPHcT at W;1W{CVTg3bx?5F(oCvg(pwuAR*xgC at JZO@bKrbdvhbE@<L=OxN z%|m?rEXZW7Fh9QphYr1l+1YuRp4P*uQ=fxQw+QFXorPVyGLiQZrlyv_$tf6)AAbW! zj{Fs6{)2YDfyBhOaR0sz9zULg6DLMd_Dr&4$I5W!Ol(z+qNBpxw!@O{~9{Gv|(y z1pfY&5F9)NuCAq!mi7WSk&XP95ELW_Yik)yPA<X8lh0vdVhX~-Mv-5H*@4bEJ#j% zgE*hU;ls=5=OQdDd=66SBJAB;5B>dmTz><psb3<FuMp#RaO-9p>i!cRJ{(8=c&Mpq zg^|{jEsB+w{H)@($X?SMSTN<gL4>%MR0KMcr3mVGp0mvFC>xUX*^GV<>z_Z8xv zfZ<^++ESpb3T9 at WVjTYl$BqqyNb~^X at h{Z5i#YG2ofl{aaLoXVi^~uiI)JhG4EOdu zczGp3OpFfo4RGK<9gK}FKwH}+xVhcHxLn6PJO#PD9ejPWQSNJqj{Xb!{1kkA9w7dI zgI at m(4jycQ+S)Pn^)<%t1(2()=yMp{-S5DeGcTdEbP(kh5#RTySBOif;Qqnt6c!0 z@CN4o70Uk^^Y}-MsUCUGxaURGzlnSJ7UTC{IC}IIVt$5lU%<V4V{j>_9(^sr)~y5_ z><@y6M<oOXsxjC5P^K5?Y(ioKj8aw)PIe+>4wqK1&rA|I6AsROUonla}f-N1@!wG zJU#2Mwq{{d=YaufieCE>dzp?arFHisMT!{7dL_Up26wUU!w0Xpu2k(_K1Sf&j0B{ zA~5i<yL;e61UFwMcRU~<Anwtg&G+;^4-wPl!54aKn&mW-Y2@*{D^?yUOT(q-d?+= z=-kbA_D=iV at CiaeBrKTOh<6HaHZwQ+!p#dtx*0rOx7q&QW&h(FbGuD6*Am_RF4;}y zxnC@5G1J^!&6V~1X;>1QSYokQBi1l8eBvrI<z_h5;Ex?RX+{#c>?$y9Mw-=SmN*&X zSobha8Td0Z1=f7Jg3V4u$=>))@NP)vRErzf8EY}i-a8p at HQo(qy}hB*9))lsF6k^Q zVEqA%l$Bl8fV{J_tW0xtgjr?>G>jZR7Pm*^TZ4xK at 0lnt5aTi+TLs5EKPhFVxzE~9 z#M*b#$2T|U>9a&=soyoe7@)e^2{~Q*ycsI8ur;qjRFo+#G5S$Un?f~EtF~&CD&=aM zvlebtzvmnn+Fyw?pvb6JkAWC_T6S8-{F96FvJQCd^EX{grZU;goO9qsziPlA%qZ z$l*eacRZ0G7FXgV2B$tk>Luiwgq#!=(W(+IE=`T9s!mWg(pH%&TCJwfib18SVtF>S z1&jN~H=4HjuB4b<bs%)UJj4TY7k%jSk?INYl*360kuWog5c^~c77av_W^SG0VX4|l ztJ?vjw1?aSfTmUJVsVGxghd@&MTsuhUj{EL6r=mik at 1p*xBh{hX{n54@S=#*-MavN zR7Pot1xs?Fgt84nF;~LJqEyi(sBEQjVAHVy7PvB-7{#L<J9b2Ql;dsM;3H5d6!*=M z(NfhR-Ygb9b<MxSk$8qQFjH4T8tTkBD)u7UEOuSX&rv2_gkb^N>O7kks||8=DGc44 z>7&HN)EF211jwegBNoABA?uzQr<>__fT7M%^&hegAyQ6XM at t#**Gos<}#x=V3{u z8}~6FOjvq0z%mx|k%@jC_SnTGAnuYIstKK$uqYI<D^HUs-Mb=#ax4ZdVqy1qf{-pt zj?()A9Jt(962l_?MODX2a~roSXe<?T-EK_Z;bBj$C(VG>~L%mlYhAb9^kC<Vrt0 zOvF!&sqy5Fwj<qf~B~h<W=&qcqo<1R9e-^_Omr{VI-yWAyxrj$9g7NN1VAL6R+# z$p(ajIYuZ79+n_cg<cX)5lLwWfPw!l8ZH>ENupsv^htjYC>1q$x<R2xnTW=TcU zwM-OOVX1A$ZX8523FGLOF_UR&X_LBg=AK{>w#7~jCLj_nDhkD*B&s-42n=%uUm|w zD at 9RHD!a1cNxePq9BBYsi<5s>p_bxuq_$$vs8o$gYZ)x8tgBP%8+gCc2U9d1y4Z zMwh13>0+2aqQZ$g+qZAWk~JaW*KRAe63V*Ok3oV|Eg at 7N4&klX{mpUFU?CBzI*;JU z^_O3;(pGHOTZx5kq%);GDq8s~R)iTop%IF%d=Cr=6HJ+5%N7TLrP~#z5Gvn^QRpZx zU|vX77oJkWR^HATCFW6LMy>_SA8V!9HGQcx=IeJO!hdz&dgdSF13KkvtpW{iH?@{ z=yaLWGBAv;f+7$k2+b+7mdxD3K95vkTVPCZyq@shQwjv-U0F*5g9eBST7<@q#8 zu6bTRQht!W4%vfuOsQeQAl3+&giWBQ;|y!fQZsXiQ#*J&)4I4tQQa#IyrurOBx zO?wG#{Q6jQHh8=3QvLGIXoxWOO1{n9Wn5sF}jt++3&pj0{0v+{Tx7EjyUHCU?7 zJ2*I;-)BQ-8o!b}t@U3c+^)d>Q+zBrwfNxJ}LVVoj;9$61Uy4s4dUI=q%Fp at Dx zDvt0A#CAIq_dU=3LwqbgD{!!?)e^ig5K^tT)V;~1mQeWVlMq=T(l%VUCp%@+NwwW zz$E%X&lPb|_?U~9uiUTCFW}EN>z(^B8&C7z<7?xxS&rASo84wEUV-40L3{z<d3jq s__?{iI3NG1|KS@3ow2JR<;4EPVZq27VhMLc2-RATHKG252K6!0YcJV@&Et;
literal 0
HcmV?d00001
Signature · 1 line
1.9.1
PATCH v2 4/4 logos: Add Solidrun's logo
Hi Fabio,
Quoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Let Solidrun's logo appear on Cuboxi and Hummingboard by default.
Signed-off-by Rabeeh Khoury <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Tom Rini <[email protected]>---
Applied to u-boot-imx, thanks !
I was not able to find the patch in patchwork. I do not know why, maybe it appears again after some time...
Best regards,
Stefano Babic
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: sbabic at denx.de =====================================================================
PATCH v2 1/4 mx6cuboxi: Add HDMI output support
In reply to Fabio EstevamQuoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add HDMI output using PLL5 as the source for the IPU clocks, and accurate VESA timings.
These settings are based on the patch from Soeren Moch <[email protected]> submitted for the tbs2910 mx6 based board.
It allows the display to work properly at 1024x768 at 60.
Quoted 7 lines
This should make the hdmi output signal compatible with most if not all modern displays.
Signed-off-by Jon Nettleton <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Tom Rini <[email protected]>Tested-by Tom Rini <[email protected]>
Quoted 171 lines
---
Changes since v1:
- Noneboard/solidrun/mx6cuboxi/mx6cuboxi.c | 101 ++++++++++++++++++++++++++++++++++- include/configs/mx6cuboxi.h | 18 ++++++- 2 files changed, 117 insertions(+), 2 deletions(-)board/solidrun/mx6cuboxi/mx6cuboxi.c +100
-1@@ -18,9 +18,11 @@#include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> #include <asm/arch/mx6-pins.h> +#include <asm/arch/mxc_hdmi.h> #include <asm/errno.h> #include <asm/gpio.h> #include <asm/imx-common/iomux-v3.h> +#include <asm/imx-common/video.h> #include <mmc.h> #include <fsl_esdhc.h> #include <miiphy.h> @@ -159,10 +161,107 @@ int board_eth_init(bd_t *bis)return cpu_eth_init (bis); } +#ifdef CONFIG_VIDEO_IPUV3 +static void do_enable_hdmi (struct display_info_t const *dev) +{ +imx_enable_hdmi_phy (); +} + +struct display_info_t const displays[] = { + { + .bus =-1 , + .addr =0 , + .pixfmt =IPU_PIX_FMT_RGB24 , + .detect = detect_hdmi, + .enable = do_enable_hdmi, + .mode = { + .name ="HDMI" , +/* 1024x768 at 60Hz (VESA)*/ + .refresh =60 , + .xres =1024 , + .yres =768 , + .pixclock =15384 , + .left_margin =160 , + .right_margin =24 , + .upper_margin =29 , + .lower_margin =3 , + .hsync_len =136 , + .vsync_len =6 , + .sync =FB_SYNC_EXT , + .vmode =FB_VMODE_NONINTERLACED + } + } +}; + +size_t display_count =ARRAY_SIZE (displays); + +static int setup_display (void ) +{ +struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR ; +int reg; +int timeout =100000 ; + +enable_ipu_clock (); +imx_setup_hdmi (); + +/* set video pll to 455MHz (24MHz * (37+11/12) / 2) */ +setbits_le32 (&ccm->analog_pll_video,BM_ANADIG_PLL_VIDEO_POWERDOWN ); + + reg =readl (&ccm->analog_pll_video); + reg &= ~BM_ANADIG_PLL_VIDEO_DIV_SELECT ; + reg |=BF_ANADIG_PLL_VIDEO_DIV_SELECT (37 ); + reg &= ~BM_ANADIG_PLL_VIDEO_POST_DIV_SELECT ; + reg |=BF_ANADIG_PLL_VIDEO_POST_DIV_SELECT (1 ); +writel (reg, &ccm->analog_pll_video); + +writel (BF_ANADIG_PLL_VIDEO_NUM_A (11 ), &ccm->analog_pll_video_num); +writel (BF_ANADIG_PLL_VIDEO_DENOM_B (12 ), &ccm->analog_pll_video_denom); + + reg &= ~BM_ANADIG_PLL_VIDEO_POWERDOWN ; +writel (reg, &ccm->analog_pll_video); + +while (timeout--) +if (readl (&ccm->analog_pll_video) &BM_ANADIG_PLL_VIDEO_LOCK ) +break ; +if (timeout <0 ) { +printf ("Warning: video pll lock timeout!\n" ); +return -ETIMEDOUT ; + } + + reg =readl (&ccm->analog_pll_video); + reg |=BM_ANADIG_PLL_VIDEO_ENABLE ; + reg &= ~BM_ANADIG_PLL_VIDEO_BYPASS ; +writel (reg, &ccm->analog_pll_video); + +/* gate ipu1_di0_clk */ +clrbits_le32 (&ccm->CCGR3,MXC_CCM_CCGR3_LDB_DI0_MASK ); + +/* select video_pll clock / 7 for ipu1_di0_clk -> 65MHz pixclock */ + reg =readl (&ccm->chsccdr); + reg &= ~(MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK | +MXC_CCM_CHSCCDR_IPU1_DI0_PODF_MASK | +MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_MASK ); + reg |= (2 <<MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_OFFSET ) | + (6 <<MXC_CCM_CHSCCDR_IPU1_DI0_PODF_OFFSET ) | + (0 <<MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET ); +writel (reg, &ccm->chsccdr); + +/* enable ipu1_di0_clk */ +setbits_le32 (&ccm->CCGR3,MXC_CCM_CCGR3_LDB_DI0_MASK ); + +return 0 ; +} +#endif /* CONFIG_VIDEO_IPUV3 */ +int board_early_init_f (void ) { +int ret =0 ;setup_iomux_uart (); -return 0 ; + +#ifdef CONFIG_VIDEO_IPUV3 + ret =setup_display (); +#endif +return ret; }int board_init (void )include/configs/mx6cuboxi.h +17
-1@@ -27,7 +27,7 @@#define CONFIG_IMX6_THERMAL #define CONFIG_SYS_GENERIC_BOARD -#define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M) +#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)#define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO @@ -66,6 +66,22 @@#define CONFIG_CONS_INDEX 1#define CONFIG_BAUDRATE 115200 +/* Framebuffer */ +#define CONFIG_VIDEO +#define CONFIG_VIDEO_IPUV3 +#define CONFIG_IPUV3_CLK 260000000 +#define CONFIG_CFB_CONSOLE +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN +#define CONFIG_BMP_16BPP +#define CONFIG_VIDEO_LOGO +#define CONFIG_VIDEO_BMP_LOGO +#define CONFIG_IMX_HDMI +#define CONFIG_IMX_VIDEO_SKIP +#define CONFIG_SYS_NO_FLASH /* Command definition */ Signature · 1 line
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150430/a672b50a/attachment.sig>
PATCH v2 1/4 mx6cuboxi: Add HDMI output support
In reply to Fabio EstevamQuoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add HDMI output using PLL5 as the source for the IPU clocks, and accurate VESA timings.
These settings are based on the patch from Soeren Moch <[email protected]> submitted for the tbs2910 mx6 based board.
It allows the display to work properly at 1024x768 at 60.
Quoted 8 lines
This should make the hdmi output signal compatible with most if not all modern displays.
Signed-off-by Jon Nettleton <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Tom Rini <[email protected]>Tested-by Tom Rini <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
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: sbabic at denx.de =====================================================================