iomux-v3: Place pad control definitions into common file
Subsystems (2)
Fabio Estevam
reviewerPATCH 1/3 iomux-v3: Place pad control definitions into common file
From: Fabio Estevam <[email protected]>
Instead of having the same PAD control definition in each MX6 variant pin file, place it into a common location.
--- arch/arm/include/asm/arch-mx6/mx6dl_pins.h | 27 --------------------------- arch/arm/include/asm/arch-mx6/mx6q_pins.h | 27 --------------------------- arch/arm/include/asm/imx-common/iomux-v3.h | 26 ++++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 54 deletions(-)
arch/arm/include/asm/arch-mx6/mx6dl_pins.h +0 -27
@@ -22,33 +22,6 @@#include <asm/imx-common/iomux-v3.h> -/* Use to set PAD control */ -#define PAD_CTL_HYS (1 << 16) -#define PAD_CTL_PUS_100K_DOWN (0 << 14) -#define PAD_CTL_PUS_47K_UP (1 << 14) -#define PAD_CTL_PUS_100K_UP (2 << 14) -#define PAD_CTL_PUS_22K_UP (3 << 14) - -#define PAD_CTL_PUE (1 << 13) -#define PAD_CTL_PKE (1 << 12) -#define PAD_CTL_ODE (1 << 11) -#define PAD_CTL_SPEED_LOW (1 << 6) -#define PAD_CTL_SPEED_MED (2 << 6) -#define PAD_CTL_SPEED_HIGH (3 << 6) -#define PAD_CTL_DSE_DISABLE (0 << 3) -#define PAD_CTL_DSE_240ohm (1 << 3) -#define PAD_CTL_DSE_120ohm (2 << 3) -#define PAD_CTL_DSE_80ohm (3 << 3) -#define PAD_CTL_DSE_60ohm (4 << 3) -#define PAD_CTL_DSE_48ohm (5 << 3) -#define PAD_CTL_DSE_40ohm (6 << 3) -#define PAD_CTL_DSE_34ohm (7 << 3) -#define PAD_CTL_SRE_FAST (1 << 0) -#define PAD_CTL_SRE_SLOW (0 << 0) - -#define IOMUX_CONFIG_SION 0x10 -#define NO_MUX_I 0 -#define NO_PAD_I 0enum {MX6_PAD_CSI0_DAT10__UART1_TXD =IOMUX_PAD (0x0360 ,0x004C ,3 ,0x0000 ,0 ,0 ),MX6_PAD_CSI0_DAT11__UART1_RXD =IOMUX_PAD (0x0364 ,0x0050 ,3 ,0x08FC ,1 ,0 ),
arch/arm/include/asm/arch-mx6/mx6q_pins.h +0 -27
@@ -24,33 +24,6 @@#include <asm/imx-common/iomux-v3.h> -/* Use to set PAD control */ -#define PAD_CTL_HYS (1 << 16) -#define PAD_CTL_PUS_100K_DOWN (0 << 14) -#define PAD_CTL_PUS_47K_UP (1 << 14) -#define PAD_CTL_PUS_100K_UP (2 << 14) -#define PAD_CTL_PUS_22K_UP (3 << 14) - -#define PAD_CTL_PUE (1 << 13) -#define PAD_CTL_PKE (1 << 12) -#define PAD_CTL_ODE (1 << 11) -#define PAD_CTL_SPEED_LOW (1 << 6) -#define PAD_CTL_SPEED_MED (2 << 6) -#define PAD_CTL_SPEED_HIGH (3 << 6) -#define PAD_CTL_DSE_DISABLE (0 << 3) -#define PAD_CTL_DSE_240ohm (1 << 3) -#define PAD_CTL_DSE_120ohm (2 << 3) -#define PAD_CTL_DSE_80ohm (3 << 3) -#define PAD_CTL_DSE_60ohm (4 << 3) -#define PAD_CTL_DSE_48ohm (5 << 3) -#define PAD_CTL_DSE_40ohm (6 << 3) -#define PAD_CTL_DSE_34ohm (7 << 3) -#define PAD_CTL_SRE_FAST (1 << 0) -#define PAD_CTL_SRE_SLOW (0 << 0) - -#define NO_MUX_I 0 -#define NO_PAD_I 0 -enum {MX6_PAD_SD2_DAT1__USDHC2_DAT1 =IOMUX_PAD (0x0360 ,0x004C ,0 ,0x0000 ,0 ,0 ),MX6_PAD_SD2_DAT1__ECSPI5_SS0 =IOMUX_PAD (0x0360 ,0x004C ,1 ,0x0834 ,0 ,0 ),
arch/arm/include/asm/imx-common/iomux-v3.h +26 -0
@@ -97,6 +97,32 @@ typedef u64 iomux_v3_cfg_t;#define MUX_CONFIG_SION (0x1 << 4) +#define PAD_CTL_HYS (1 << 16) +#define PAD_CTL_PUS_100K_DOWN (0 << 14) +#define PAD_CTL_PUS_47K_UP (1 << 14) +#define PAD_CTL_PUS_100K_UP (2 << 14) +#define PAD_CTL_PUS_22K_UP (3 << 14) + +#define PAD_CTL_PUE (1 << 13) +#define PAD_CTL_PKE (1 << 12) +#define PAD_CTL_ODE (1 << 11) +#define PAD_CTL_SPEED_LOW (1 << 6) +#define PAD_CTL_SPEED_MED (2 << 6) +#define PAD_CTL_SPEED_HIGH (3 << 6) +#define PAD_CTL_DSE_DISABLE (0 << 3) +#define PAD_CTL_DSE_240ohm (1 << 3) +#define PAD_CTL_DSE_120ohm (2 << 3) +#define PAD_CTL_DSE_80ohm (3 << 3) +#define PAD_CTL_DSE_60ohm (4 << 3) +#define PAD_CTL_DSE_48ohm (5 << 3) +#define PAD_CTL_DSE_40ohm (6 << 3) +#define PAD_CTL_DSE_34ohm (7 << 3) +#define PAD_CTL_SRE_FAST (1 << 0) +#define PAD_CTL_SRE_SLOW (0 << 0) + +#define NO_MUX_I 0 +#define NO_PAD_I 0 +int imx_iomux_v3_setup_pad (iomux_v3_cfg_t pad);int imx_iomux_v3_setup_multiple_pads (iomux_v3_cfg_t const *pad_list,unsigned count);
Signature · 1 line
1.7.9.5
Fabio Estevam
reviewerPATCH 2/3 mx6: Add solo-lite variant support
From: Fabio Estevam <[email protected]>
mx6 solo-lite is another member of the mx6 series.
For more information about mx6 solo-lite, please visit:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6SL&nodeId=018rH3ZrDRB24A
--- arch/arm/cpu/armv7/mx6/clock.c | 38 ++++++++++++++++- arch/arm/include/asm/arch-mx6/crm_regs.h | 5 +++ arch/arm/include/asm/arch-mx6/imx-regs.h | 63 +++++++++++++++++++++++++++- arch/arm/include/asm/arch-mx6/mx6-pins.h | 4 ++ arch/arm/include/asm/arch-mx6/mx6sl_pins.h | 25 +++++++++++ 5 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 arch/arm/include/asm/arch-mx6/mx6sl_pins.h
arch/arm/cpu/armv7/mx6/clock.c +36 -2
@@ -186,12 +186,16 @@ static u32 get_ipg_per_clk(void)static u32 get_uart_clk (void ) {u32 reg, uart_podf; - +u32 freq =PLL3_80M ; reg =__raw_readl (&imx_ccm->cscdr1); +#ifdef CONFIG_MX6SL +if (reg &MXC_CCM_CSCDR1_UART_CLK_SEL ) + freq =MXC_HCLK ; +#endif reg &=MXC_CCM_CSCDR1_UART_CLK_PODF_MASK ; uart_podf = reg >>MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET ; -return PLL3_80M / (uart_podf +1 ); +return freq / (uart_podf +1 ); }static u32 get_cspi_clk (void )
@@ -252,6 +256,35 @@ static u32 get_emi_slow_clk(void)return root_freq / (emi_slow_pof +1 ); } +#ifdef CONFIG_MX6SL +static u32 get_mmdc_ch0_clk (void ) +{ +u32 cbcmr =__raw_readl (&imx_ccm->cbcmr); +u32 cbcdr =__raw_readl (&imx_ccm->cbcdr); +u32 freq, podf; + + podf = (cbcdr &MXC_CCM_CBCDR_MMDC_CH1_PODF_MASK ) \ + >>MXC_CCM_CBCDR_MMDC_CH1_PODF_OFFSET ; + +switch ((cbcmr &MXC_CCM_CBCMR_PRE_PERIPH2_CLK_SEL_MASK ) >> +MXC_CCM_CBCMR_PRE_PERIPH2_CLK_SEL_OFFSET ) { +case 0 : + freq =decode_pll (PLL_BUS ,MXC_HCLK ); +break ; +case 1 : + freq =PLL2_PFD2_FREQ ; +break ; +case 2 : + freq =PLL2_PFD0_FREQ ; +break ; +case 3 : + freq =PLL2_PFD2_DIV_FREQ ; + } + +return freq / (podf +1 ); + +} +#else static u32 get_mmdc_ch0_clk (void ) {u32 cbcdr =__raw_readl (&imx_ccm->cbcdr);
@@ -260,6 +293,7 @@ static u32 get_mmdc_ch0_clk(void) return get_periph_clk() / (mmdc_ch0_podf + 1); } +#endif static u32 get_usdhc_clk (u32 port) {
arch/arm/include/asm/arch-mx6/crm_regs.h +5 -0
@@ -244,7 +244,12 @@ struct mxc_ccm_reg {#define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_MASK (0x7 << 8)#define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_OFFSET 6#define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_MASK (0x3 << 6) +#ifdef CONFIG_MX6SL +#define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK 0x1F +#define MXC_CCM_CSCDR1_UART_CLK_SEL (1 << 6) +#else #define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK 0x3F +#endif #define MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET 0/* Define the bits in register CS1CDR */
arch/arm/include/asm/arch-mx6/imx-regs.h +62 -1
136 lines not on this page · raw message
arch/arm/include/asm/arch-mx6/mx6-pins.h +4 -0
@@ -24,7 +24,11 @@#if defined(CONFIG_MX6DL ) || defined(CONFIG_MX6S )#include "mx6dl_pins.h" #else +#if defined(CONFIG_MX6SL ) +#include "mx6sl_pins.h" +#else #error "Please select cpu" +#endif /* CONFIG_MX6SL */ #endif /* CONFIG_MX6DL or CONFIG_MX6S */ #endif /* CONFIG_MX6Q */
arch/arm/include/asm/arch-mx6/mx6sl_pins.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright (C) 2013 Freescale Semiconductor, Inc. All Rights Reserved. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef __ASM_ARCH_MX6_MX6SL_PINS_H__ +#define __ASM_ARCH_MX6_MX6SL_PINS_H__ + +#include <asm/imx-common/iomux-v3.h> + +enum { +MX6_PAD_SD2_CLK__USDHC2_CLK =IOMUX_PAD (0x055C ,0x0254 ,0 ,0x0000 ,0 ,0 ), +MX6_PAD_SD2_CMD__USDHC2_CMD =IOMUX_PAD (0x0560 ,0x0258 ,0 ,0x0000 ,0 ,0 ), +MX6_PAD_SD2_DAT0__USDHC2_DAT0 =IOMUX_PAD (0x0564 ,0x025C ,0 ,0x0000 ,0 ,0 ), +MX6_PAD_SD2_DAT1__USDHC2_DAT1 =IOMUX_PAD (0x0568 ,0x0260 ,0 ,0x0000 ,0 ,0 ), +MX6_PAD_SD2_DAT2__USDHC2_DAT2 =IOMUX_PAD (0x056C ,0x0264 ,0 ,0x0000 ,0 ,0 ), +MX6_PAD_SD2_DAT3__USDHC2_DAT3 =IOMUX_PAD (0x0570 ,0x0268 ,0 ,0x0000 ,0 ,0 ), +MX6_PAD_UART1_RXD__UART1_RXD =IOMUX_PAD (0x05A0 ,0x0298 ,0 ,0x07FC ,0 ,0 ), +MX6_PAD_UART1_TXD__UART1_TXD =IOMUX_PAD (0x05A4 ,0x029C ,0 ,0x0000 ,0 ,0 ), +}; +#endif /* __ASM_ARCH_MX6_MX6SL_PINS_H__ */
Signature · 1 line
1.7.9.5
Fabio Estevam
reviewerPATCH 3/3 mx6sl: Add initial support for mx6slevk board
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
mx6slevk board is a development board from Freescale based on the mx6 solo-lite processor.
For details about mx6slevk, please refer to:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6SLEVK&parentCode=i.MX6SL&fpsp=1
--- MAINTAINERS | 1 + board/freescale/mx6slevk/Makefile | 28 +++++ board/freescale/mx6slevk/imximage.cfg | 118 ++++++++++++++++++++ board/freescale/mx6slevk/mx6slevk.c | 102 ++++++++++++++++++ boards.cfg | 1 + include/configs/mx6slevk.h | 189 +++++++++++++++++++++++++++++++++ 6 files changed, 439 insertions(+) create mode 100644 board/freescale/mx6slevk/Makefile create mode 100644 board/freescale/mx6slevk/imximage.cfg create mode 100644 board/freescale/mx6slevk/mx6slevk.c create mode 100644 include/configs/mx6slevk.h
MAINTAINERS +1 -0
@@ -665,6 +665,7 @@ Fabio Estevam <[email protected]> mx6qsabresd i.MX6Q mx6qsabreauto i.MX6Q wandboard i.MX6DL/S + mx6slevk i.MX6SL Daniel Gorsulowski <[email protected]>
board/freescale/mx6slevk/Makefile new file +28 -0
@@ -0,0 +1,28 @@ +# (C) Copyright 2013 Freescale Semiconductor, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS := mx6slevk.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/freescale/mx6slevk/imximage.cfg new file +118 -0
118 lines not on this page · raw message
board/freescale/mx6slevk/mx6slevk.c new file +102 -0
102 lines not on this page · raw message
boards.cfg +1 -0
@@ -257,6 +257,7 @@ mx6qarm2 arm armv7 mx6qarm2 freesca mx6qsabreauto arm armv7 mx6qsabreauto freescale mx6 mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg mx6qsabrelite arm armv7 mx6qsabrelite freescale mx6 mx6qsabrelite:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg mx6qsabresd arm armv7 mx6qsabresd freescale mx6 mx6qsabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg +mx6slevk arm armv7 mx6slevk freescale mx6 mx6slevk:IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL eco5pk arm armv7 eco5pk 8dtech omap3 nitrogen6dl arm armv7 nitrogen6x boundary mx6 nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL,DDR_MB=1024 nitrogen6dl2g arm armv7 nitrogen6x boundary mx6 nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl2g.cfg,MX6DL,DDR_MB=2048
include/configs/mx6slevk.h new file +189 -0
189 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 3/3 mx6sl: Add initial support for mx6slevk board
Am 06.04.2013 02:55, schrieb Fabio Estevam:
Quoted 52 lines
From: Fabio Estevam <[email protected]>
mx6slevk board is a development board from Freescale based on the mx6 solo-lite processor.
For details about mx6slevk, please refer to:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX6SLEVK&parentCode=i.MX6SL&fpsp=1Signed-off-by Fabio Estevam <[email protected]>---
board/freescale/mx6slevk/imximage.cfg new file +35
-0@@ -0,0 +1,118 @@ +/* + * Copyright (C) 2013 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) any later version. + * + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ + +/* image version */ + +IMAGE_VERSION 2 + +/* + * Boot Device : one of + * spi, sd (the board has no nand neither onenand) + */ + +BOOT_FROM sd + +/* + * Device Configuration Data (DCD) + * + * Each entry must have the format: + * Addr-type Address Value + * + * where: + * Addr-type register length (1,2 or 4 bytes) + * Address absolute address of the register + * value value to be stored in the register
board/freescale/mx6slevk/imximage.cfg line 45
Quoted 10 lines
board/freescale/mx6slevk/imximage.cfg new file +10
-0+ */ +DATA 4 0x020c4018 0x00260324 + +DATA 4 0x020c4068 0xffffffff +DATA 4 0x020c406c 0xffffffff +DATA 4 0x020c4070 0xffffffff +DATA 4 0x020c4074 0xffffffff +DATA 4 0x020c4078 0xffffffff +DATA 4 0x020c407c 0xffffffff +DATA 4 0x020c4080 0xffffffff
Again this default stuff? ;)
Best regards
Dirk
Fabio Estevam
reviewerPATCH 3/3 mx6sl: Add initial support for mx6slevk board
Hi Dirk,
Quoted 10 lines · Dirk Behme
board/freescale/mx6slevk/imximage.cfg line 45
Quoted 7 lines
board/freescale/mx6slevk/imximage.cfg new file +7
-0+DATA 4 0x020c4068 0xffffffff +DATA 4 0x020c406c 0xffffffff +DATA 4 0x020c4070 0xffffffff +DATA 4 0x020c4074 0xffffffff +DATA 4 0x020c4078 0xffffffff +DATA 4 0x020c407c 0xffffffff +DATA 4 0x020c4080 0xffffffffAgain this default stuff? ;)
I should have replied to your previous comment.
I tried removing this block as you suggest and the board does not boot.
Then I read the following from the FSL U-boot:
"/* Enable all clocks (they are disabled by ROM code)*/
That's why I am keeping them.
Regards,
Fabio Estevam
PATCH 3/3 mx6sl: Add initial support for mx6slevk board
Am 06.04.2013 14:47, schrieb Fabio Estevam:
Quoted 15 lines
Hi Dirk,
Quoted 10 lines · Dirk Behme
board/freescale/mx6slevk/imximage.cfg line 45
Quoted 7 lines
board/freescale/mx6slevk/imximage.cfg new file +7
-0+DATA 4 0x020c4068 0xffffffff +DATA 4 0x020c406c 0xffffffff +DATA 4 0x020c4070 0xffffffff +DATA 4 0x020c4074 0xffffffff +DATA 4 0x020c4078 0xffffffff +DATA 4 0x020c407c 0xffffffff +DATA 4 0x020c4080 0xffffffffAgain this default stuff? ;)
Quoted 8 lines
I should have replied to your previous comment.
I tried removing this block as you suggest and the board does not boot.
Then I read the following from the FSL U-boot:
"/* Enable all clocks (they are disabled by ROM code)*/That's why I am keeping them.
Most probably it would be sufficient to enable only the clocks needed for booting ;) And not all clocks. On the other boards we do
/* set the default clock gate to save power */
DATA 4 0x020c4068 0x00C03F3F
DATA 4 0x020c406c 0x0030FC03
DATA 4 0x020c4070 0x0FFFC000
DATA 4 0x020c4074 0x3FF00000
DATA 4 0x020c4078 0x00FFF300
DATA 4 0x020c407c 0x0F0000C3
DATA 4 0x020c4080 0x000003FF
Do you like to try anything similar here, too?
Best regards
Dirk
Fabio Estevam
reviewerPATCH 3/3 mx6sl: Add initial support for mx6slevk board
Quoted 12 lines · Dirk Behme
Most probably it would be sufficient to enable only the clocks needed for booting ;) And not all clocks. On the other boards we do
/* set the default clock gate to save power */
DATA 40x020c40680x00C03F3F
DATA 40x020c406c0x0030FC03
DATA 40x020c40700x0FFFC000
DATA 40x020c40740x3FF00000
DATA 40x020c40780x00FFF300
DATA 40x020c407c0x0F0000C3
DATA 40x020c40800x000003FF
Quoted 3 lines
Do you like to try anything similar here, too?
No, sorry. It is possible to turn some clocks off, for sure, but I do not see real benefit by doing this on this solo-lite board.
U-boot runs only for few seconds (or ms), so not much of power savings we can do in the bootloader.
I am just setting the clocks to the default states, so it is up to the kernel to manage the clocks as needed.
And I don't want to face the risk to turn some clocks off and then realize later that the kernel was expecting a clock to be on and start seeing weird run-time issues.
PATCH 3/3 mx6sl: Add initial support for mx6slevk board
Am 06.04.2013 16:15, schrieb Fabio Estevam:
Quoted 16 lines · Dirk Behme
Quoted 15 lines
Most probably it would be sufficient to enable only the clocks needed for booting ;) And not all clocks. On the other boards we do
/* set the default clock gate to save power */
DATA 40x020c40680x00C03F3F
DATA 40x020c406c0x0030FC03
DATA 40x020c40700x0FFFC000
DATA 40x020c40740x3FF00000
DATA 40x020c40780x00FFF300
DATA 40x020c407c0x0F0000C3
DATA 40x020c40800x000003FF
Quoted 7 lines
Quoted 1 line
Do you like to try anything similar here, too?
No, sorry. It is possible to turn some clocks off, for sure, but I do not see real benefit by doing this on this solo-lite board.
U-boot runs only for few seconds (or ms), so not much of power savings we can do in the bootloader.
To my understanding what we do above is not about saving power in the bootloader ...
Quoted 2 lines
I am just setting the clocks to the default states, so it is up to the kernel to manage the clocks as needed.
... but saving power over the whole (kernel) runtime. I might be wrong, but to my understanding the kernel doesn't *disable* unneeded clocks?
So it's up to the bootloader to enable only the peripherals (clocks) really needed for booting. And then it's up to the kernel's driver init functions to enable the needed clocks for the subsystem once it's needed.
But as I won't use this board I won't care about the power consumption here. If you think it's fine for the use cases of this board to enable all clocks by default, then this shouldn't stop applying this patch.
Best regards
Dirk
Fabio Estevam
reviewerPATCH 3/3 mx6sl: Add initial support for mx6slevk board
Hi Dirk,
Quoted 10 lines · Dirk Behme
... but saving power over the whole (kernel) runtime. I might be wrong, but to my understanding the kernel doesn't *disable* unneeded clocks?
So it's up to the bootloader to enable only the peripherals (clocks) really needed for booting. And then it's up to the kernel's driver init functions to enable the needed clocks for the subsystem once it's needed.
But as I won't use this board I won't care about the power consumption here. If you think it's fine for the use cases of this board to enable all clocks by default, then this shouldn't stop applying this patch.
Ok, understood. I will go through each one of the CCM registers and check what clocks can be turned off.
This may take some time though as it needs proper testing.
I suggest that we keep the current clock settings as is, so that the board support can reach U-boot, then later I can submit a patch for turning off the unneeded clocks.
Thanks,
Fabio Estevam
PATCH 3/3 mx6sl: Add initial support for mx6slevk board
Am 06.04.2013 18:40, schrieb Fabio Estevam:
Quoted 15 lines
Hi Dirk,
Quoted 10 lines · Dirk Behme
... but saving power over the whole (kernel) runtime. I might be wrong, but to my understanding the kernel doesn't *disable* unneeded clocks?
So it's up to the bootloader to enable only the peripherals (clocks) really needed for booting. And then it's up to the kernel's driver init functions to enable the needed clocks for the subsystem once it's needed.
But as I won't use this board I won't care about the power consumption here. If you think it's fine for the use cases of this board to enable all clocks by default, then this shouldn't stop applying this patch.
Quoted 8 lines
Ok, understood. I will go through each one of the CCM registers and check what clocks can be turned off.
This may take some time though as it needs proper testing.
I suggest that we keep the current clock settings as is, so that the board support can reach U-boot, then later I can submit a patch for turning off the unneeded clocks.
Sounds like a good plan :)
Thanks
Dirk
P.S.: I would think that the clock settings of the other boards should be a good starting point to minimize the work. At least if the SoloLite clocks are not completely different ;)
PATCH 3/3 mx6sl: Add initial support for mx6slevk board
In reply to Fabio EstevamQuoted 15 lines · Fabio Estevam
Hi Dirk,
Quoted 10 lines · Dirk Behme
... but saving power over the whole (kernel) runtime. I might be wrong, but to my understanding the kernel doesn't *disable* unneeded clocks?
So it's up to the bootloader to enable only the peripherals (clocks) really needed for booting. And then it's up to the kernel's driver init functions to enable the needed clocks for the subsystem once it's needed.
But as I won't use this board I won't care about the power consumption here. If you think it's fine for the use cases of this board to enable all clocks by default, then this shouldn't stop applying this patch.
Quoted 8 lines
Ok, understood. I will go through each one of the CCM registers and check what clocks can be turned off.
This may take some time though as it needs proper testing.
I suggest that we keep the current clock settings as is, so that the board support can reach U-boot, then later I can submit a patch for turning off the unneeded clocks.
+1
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 3/3 mx6sl: Add initial support for mx6slevk board
In reply to Fabio EstevamQuoted 15 lines · Fabio Estevam
Hi Dirk,
Quoted 10 lines · Dirk Behme
... but saving power over the whole (kernel) runtime. I might be wrong, but to my understanding the kernel doesn't *disable* unneeded clocks?
So it's up to the bootloader to enable only the peripherals (clocks) really needed for booting. And then it's up to the kernel's driver init functions to enable the needed clocks for the subsystem once it's needed.
But as I won't use this board I won't care about the power consumption here. If you think it's fine for the use cases of this board to enable all clocks by default, then this shouldn't stop applying this patch.
Hi Fabio,
Quoted 8 lines
Ok, understood. I will go through each one of the CCM registers and check what clocks can be turned off.
This may take some time though as it needs proper testing.
I suggest that we keep the current clock settings as is, so that the board support can reach U-boot, then later I can submit a patch for turning off the unneeded clocks.
Ok, let's do in this way - I agree that U-boot should only turn on the clocks that it requires and do not touch the rest. But let's start pushing this into u-boot-imx and then we can trim this setup.
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 =====================================================================
Fabio Estevam
reviewerPATCH 3/3 mx6sl: Add initial support for mx6slevk board
Hi Stefano,
Quoted 3 lines · Stefano Babic
Ok, let's do in this way - I agree that U-boot should only turn on the clocks that it requires and do not touch the rest. But let's start pushing this into u-boot-imx and then we can trim this setup.
Please let me know when this series reach u-boot-imx, so that I can work on disabling the unneeded clocks.
Regards,
Fabio Estevam
PATCH 3/3 mx6sl: Add initial support for mx6slevk board
Quoted 11 lines · Fabio Estevam
Hi Stefano,
Quoted 3 lines · Stefano Babic
Ok, let's do in this way - I agree that U-boot should only turn on the clocks that it requires and do not touch the rest. But let's start pushing this into u-boot-imx and then we can trim this setup.
Please let me know when this series reach u-boot-imx, so that I can work on disabling the unneeded clocks.
They are ready to be merged - I will put it into u-boot-imx.
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 1/3 iomux-v3: Place pad control definitions into common file
In reply to Fabio EstevamQuoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Instead of having the same PAD control definition in each MX6 variant pin file, place it into a common location.
Signed-off-by Fabio Estevam <[email protected]>
Breaks Wandboard builds...
Quoted 29 lines
--- arch/arm/include/asm/arch-mx6/mx6dl_pins.h | 27 --------------------------- arch/arm/include/asm/arch-mx6/mx6q_pins.h | 27 --------------------------- arch/arm/include/asm/imx-common/iomux-v3.h | 26 ++++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 54 deletions(-)arch/arm/include/asm/arch-mx6/mx6dl_pins.h +0
-15@@ -22,33 +22,6 @@#include <asm/imx-common/iomux-v3.h> -/* Use to set PAD control */ -#define PAD_CTL_HYS (1 << 16) -#define PAD_CTL_PUS_100K_DOWN (0 << 14) -#define PAD_CTL_PUS_47K_UP (1 << 14) -#define PAD_CTL_PUS_100K_UP (2 << 14) -#define PAD_CTL_PUS_22K_UP (3 << 14) - -#define PAD_CTL_PUE (1 << 13) -#define PAD_CTL_PKE (1 << 12) -#define PAD_CTL_ODE (1 << 11) -#define PAD_CTL_SPEED_LOW (1 << 6) -#define PAD_CTL_SPEED_MED (2 << 6) -#define PAD_CTL_SPEED_HIGH (3 << 6) -#define PAD_CTL_DSE_DISABLE (0 << 3) -#define PAD_CTL_DSE_240ohm (1 << 3)
arch/arm/include/asm/arch-mx6/mx6dl_pins.h line 49
Quoted 10 lines
arch/arm/include/asm/arch-mx6/mx6dl_pins.h +0
-10-#define PAD_CTL_DSE_120ohm (2 << 3) -#define PAD_CTL_DSE_80ohm (3 << 3) -#define PAD_CTL_DSE_60ohm (4 << 3) -#define PAD_CTL_DSE_48ohm (5 << 3) -#define PAD_CTL_DSE_40ohm (6 << 3) -#define PAD_CTL_DSE_34ohm (7 << 3) -#define PAD_CTL_SRE_FAST (1 << 0) -#define PAD_CTL_SRE_SLOW (0 << 0) - -#define IOMUX_CONFIG_SION 0x10
This has not been defined.
Quoted 83 lines
arch/arm/include/asm/arch-mx6/mx6dl_pins.h +0
-2-#define NO_MUX_I 0 -#define NO_PAD_I 0enum {MX6_PAD_CSI0_DAT10__UART1_TXD =IOMUX_PAD (0x0360 ,0x004C ,3 ,0x0000 ,0 ,0 ),MX6_PAD_CSI0_DAT11__UART1_RXD =IOMUX_PAD (0x0364 ,0x0050 ,3 ,0x08FC ,1 ,0 ),arch/arm/include/asm/arch-mx6/mx6q_pins.h +0
-27@@ -24,33 +24,6 @@#include <asm/imx-common/iomux-v3.h> -/* Use to set PAD control */ -#define PAD_CTL_HYS (1 << 16) -#define PAD_CTL_PUS_100K_DOWN (0 << 14) -#define PAD_CTL_PUS_47K_UP (1 << 14) -#define PAD_CTL_PUS_100K_UP (2 << 14) -#define PAD_CTL_PUS_22K_UP (3 << 14) - -#define PAD_CTL_PUE (1 << 13) -#define PAD_CTL_PKE (1 << 12) -#define PAD_CTL_ODE (1 << 11) -#define PAD_CTL_SPEED_LOW (1 << 6) -#define PAD_CTL_SPEED_MED (2 << 6) -#define PAD_CTL_SPEED_HIGH (3 << 6) -#define PAD_CTL_DSE_DISABLE (0 << 3) -#define PAD_CTL_DSE_240ohm (1 << 3) -#define PAD_CTL_DSE_120ohm (2 << 3) -#define PAD_CTL_DSE_80ohm (3 << 3) -#define PAD_CTL_DSE_60ohm (4 << 3) -#define PAD_CTL_DSE_48ohm (5 << 3) -#define PAD_CTL_DSE_40ohm (6 << 3) -#define PAD_CTL_DSE_34ohm (7 << 3) -#define PAD_CTL_SRE_FAST (1 << 0) -#define PAD_CTL_SRE_SLOW (0 << 0) - -#define NO_MUX_I 0 -#define NO_PAD_I 0 -enum {MX6_PAD_SD2_DAT1__USDHC2_DAT1 =IOMUX_PAD (0x0360 ,0x004C ,0 ,0x0000 ,0 ,0 ),MX6_PAD_SD2_DAT1__ECSPI5_SS0 =IOMUX_PAD (0x0360 ,0x004C ,1 ,0x0834 ,0 ,0 ),arch/arm/include/asm/imx-common/iomux-v3.h +26
-1@@ -97,6 +97,32 @@ typedef u64 iomux_v3_cfg_t;#define MUX_CONFIG_SION (0x1 << 4) +#define PAD_CTL_HYS (1 << 16) +#define PAD_CTL_PUS_100K_DOWN (0 << 14) +#define PAD_CTL_PUS_47K_UP (1 << 14) +#define PAD_CTL_PUS_100K_UP (2 << 14) +#define PAD_CTL_PUS_22K_UP (3 << 14) + +#define PAD_CTL_PUE (1 << 13) +#define PAD_CTL_PKE (1 << 12) +#define PAD_CTL_ODE (1 << 11) +#define PAD_CTL_SPEED_LOW (1 << 6) +#define PAD_CTL_SPEED_MED (2 << 6) +#define PAD_CTL_SPEED_HIGH (3 << 6) +#define PAD_CTL_DSE_DISABLE (0 << 3) +#define PAD_CTL_DSE_240ohm (1 << 3) +#define PAD_CTL_DSE_120ohm (2 << 3) +#define PAD_CTL_DSE_80ohm (3 << 3) +#define PAD_CTL_DSE_60ohm (4 << 3) +#define PAD_CTL_DSE_48ohm (5 << 3) +#define PAD_CTL_DSE_40ohm (6 << 3) +#define PAD_CTL_DSE_34ohm (7 << 3) +#define PAD_CTL_SRE_FAST (1 << 0) +#define PAD_CTL_SRE_SLOW (0 << 0) + +#define NO_MUX_I 0 +#define NO_PAD_I 0 +int imx_iomux_v3_setup_pad (iomux_v3_cfg_t pad);int imx_iomux_v3_setup_multiple_pads (iomux_v3_cfg_t const *pad_list,unsigned count); --1.7.9.5
Quoted 4 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br