Message ID | 1383625260-22294-10-git-send-email-lokeshvutla@ti.com |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
On Mon, Nov 4, 2013 at 11:20 PM, Lokesh Vutla <lokeshvutla@ti.com> wrote: > Updating the mux data for UART, and adding data for i2c0 and mmc. > > Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> > --- > arch/arm/include/asm/arch-am33xx/mux_am43xx.h | 4 +++- > board/ti/am43xx/mux.c | 24 ++++++++++++++++++++++-- > 2 files changed, 25 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h > index 0206912..e95efdd 100644 > --- a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h > +++ b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h > @@ -16,7 +16,9 @@ > __raw_writel(value, (CTRL_BASE + offset)); > > /* PAD Control Fields */ > -#define SLEWCTRL (0x1 << 19) > +#define DSPULLUDEN (0x1 << 27) /* DS0 mode Pull-Up/Down enable */ > +#define DSPULLUDDIS (0x0 << 27) /* DS0 mode Pull-Up/Down Disable */ > +#define SLEWCTRL (0x1 << 19) /* Slow slew rate selection */ > #define RXACTIVE (0x1 << 18) > #define PULLDOWN_EN (0x0 << 17) /* Pull Down Selection */ > #define PULLUP_EN (0x1 << 17) /* Pull Up Selection */ > diff --git a/board/ti/am43xx/mux.c b/board/ti/am43xx/mux.c > index 700e9a7..818a046 100644 > --- a/board/ti/am43xx/mux.c > +++ b/board/ti/am43xx/mux.c > @@ -12,8 +12,26 @@ > #include "board.h" > > static struct module_pin_mux uart0_pin_mux[] = { > - {OFFSET(uart0_rxd), (MODE(0) | RXACTIVE)}, /* UART0_RXD */ > - {OFFSET(uart0_txd), (MODE(0))}, /* UART0_TXD */ > + {OFFSET(uart0_rxd), > + (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL | DSPULLUDEN)}, > + {OFFSET(uart0_txd), > + (MODE(0) | PULLUDDIS | PULLUP_EN | SLEWCTRL | DSPULLUDEN)}, > + {-1}, > +}; > + > +static struct module_pin_mux mmc0_pin_mux[] = { > + {OFFSET(mmc0_clk), (MODE(0) | PULLUDDIS | RXACTIVE | DSPULLUDEN)}, > + {OFFSET(mmc0_cmd), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, > + {OFFSET(mmc0_dat0), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, > + {OFFSET(mmc0_dat1), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, > + {OFFSET(mmc0_dat2), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, > + {OFFSET(mmc0_dat3), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, > + {-1}, Hmm i don't think updating the DSPULL here is a good idea. Since not all the pins are used in U-Boot, this is just partially updating the pulls for the low power state. I would suggest leaving this bit for the kernel where things can be updated without updating the bootloader. Regards, Vaibhav
On Wednesday 06 November 2013 06:13 PM, Vaibhav Bedia wrote: > On Mon, Nov 4, 2013 at 11:20 PM, Lokesh Vutla <lokeshvutla@ti.com> wrote: >> Updating the mux data for UART, and adding data for i2c0 and mmc. >> >> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> >> --- >> arch/arm/include/asm/arch-am33xx/mux_am43xx.h | 4 +++- >> board/ti/am43xx/mux.c | 24 ++++++++++++++++++++++-- >> 2 files changed, 25 insertions(+), 3 deletions(-) >> >> diff --git a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h >> index 0206912..e95efdd 100644 >> --- a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h >> +++ b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h >> @@ -16,7 +16,9 @@ >> __raw_writel(value, (CTRL_BASE + offset)); >> >> /* PAD Control Fields */ >> -#define SLEWCTRL (0x1 << 19) >> +#define DSPULLUDEN (0x1 << 27) /* DS0 mode Pull-Up/Down enable */ >> +#define DSPULLUDDIS (0x0 << 27) /* DS0 mode Pull-Up/Down Disable */ >> +#define SLEWCTRL (0x1 << 19) /* Slow slew rate selection */ >> #define RXACTIVE (0x1 << 18) >> #define PULLDOWN_EN (0x0 << 17) /* Pull Down Selection */ >> #define PULLUP_EN (0x1 << 17) /* Pull Up Selection */ >> diff --git a/board/ti/am43xx/mux.c b/board/ti/am43xx/mux.c >> index 700e9a7..818a046 100644 >> --- a/board/ti/am43xx/mux.c >> +++ b/board/ti/am43xx/mux.c >> @@ -12,8 +12,26 @@ >> #include "board.h" >> >> static struct module_pin_mux uart0_pin_mux[] = { >> - {OFFSET(uart0_rxd), (MODE(0) | RXACTIVE)}, /* UART0_RXD */ >> - {OFFSET(uart0_txd), (MODE(0))}, /* UART0_TXD */ >> + {OFFSET(uart0_rxd), >> + (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL | DSPULLUDEN)}, >> + {OFFSET(uart0_txd), >> + (MODE(0) | PULLUDDIS | PULLUP_EN | SLEWCTRL | DSPULLUDEN)}, >> + {-1}, >> +}; >> + >> +static struct module_pin_mux mmc0_pin_mux[] = { >> + {OFFSET(mmc0_clk), (MODE(0) | PULLUDDIS | RXACTIVE | DSPULLUDEN)}, >> + {OFFSET(mmc0_cmd), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >> + {OFFSET(mmc0_dat0), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >> + {OFFSET(mmc0_dat1), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >> + {OFFSET(mmc0_dat2), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >> + {OFFSET(mmc0_dat3), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >> + {-1}, > > Hmm i don't think updating the DSPULL here is a good idea. Since not > all the pins > are used in U-Boot, this is just partially updating the pulls for the > low power state. > I would suggest leaving this bit for the kernel where things can be > updated without > updating the bootloader. These are the preferred settings given to me. Any way if kernel is updating it overwrites these settings, it shouldn't matter I guess..:) Thanks and regards, Lokesh > > Regards, > Vaibhav >
On Wed, Nov 6, 2013 at 8:32 AM, Lokesh Vutla <lokeshvutla@ti.com> wrote: > On Wednesday 06 November 2013 06:13 PM, Vaibhav Bedia wrote: >> On Mon, Nov 4, 2013 at 11:20 PM, Lokesh Vutla <lokeshvutla@ti.com> wrote: >>> Updating the mux data for UART, and adding data for i2c0 and mmc. >>> >>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> >>> --- >>> arch/arm/include/asm/arch-am33xx/mux_am43xx.h | 4 +++- >>> board/ti/am43xx/mux.c | 24 ++++++++++++++++++++++-- >>> 2 files changed, 25 insertions(+), 3 deletions(-) >>> >>> diff --git a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h >>> index 0206912..e95efdd 100644 >>> --- a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h >>> +++ b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h >>> @@ -16,7 +16,9 @@ >>> __raw_writel(value, (CTRL_BASE + offset)); >>> >>> /* PAD Control Fields */ >>> -#define SLEWCTRL (0x1 << 19) >>> +#define DSPULLUDEN (0x1 << 27) /* DS0 mode Pull-Up/Down enable */ >>> +#define DSPULLUDDIS (0x0 << 27) /* DS0 mode Pull-Up/Down Disable */ >>> +#define SLEWCTRL (0x1 << 19) /* Slow slew rate selection */ >>> #define RXACTIVE (0x1 << 18) >>> #define PULLDOWN_EN (0x0 << 17) /* Pull Down Selection */ >>> #define PULLUP_EN (0x1 << 17) /* Pull Up Selection */ >>> diff --git a/board/ti/am43xx/mux.c b/board/ti/am43xx/mux.c >>> index 700e9a7..818a046 100644 >>> --- a/board/ti/am43xx/mux.c >>> +++ b/board/ti/am43xx/mux.c >>> @@ -12,8 +12,26 @@ >>> #include "board.h" >>> >>> static struct module_pin_mux uart0_pin_mux[] = { >>> - {OFFSET(uart0_rxd), (MODE(0) | RXACTIVE)}, /* UART0_RXD */ >>> - {OFFSET(uart0_txd), (MODE(0))}, /* UART0_TXD */ >>> + {OFFSET(uart0_rxd), >>> + (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL | DSPULLUDEN)}, >>> + {OFFSET(uart0_txd), >>> + (MODE(0) | PULLUDDIS | PULLUP_EN | SLEWCTRL | DSPULLUDEN)}, >>> + {-1}, >>> +}; >>> + >>> +static struct module_pin_mux mmc0_pin_mux[] = { >>> + {OFFSET(mmc0_clk), (MODE(0) | PULLUDDIS | RXACTIVE | DSPULLUDEN)}, >>> + {OFFSET(mmc0_cmd), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>> + {OFFSET(mmc0_dat0), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>> + {OFFSET(mmc0_dat1), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>> + {OFFSET(mmc0_dat2), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>> + {OFFSET(mmc0_dat3), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>> + {-1}, >> >> Hmm i don't think updating the DSPULL here is a good idea. Since not >> all the pins >> are used in U-Boot, this is just partially updating the pulls for the >> low power state. >> I would suggest leaving this bit for the kernel where things can be >> updated without >> updating the bootloader. > These are the preferred settings given to me. > Any way if kernel is updating it overwrites these settings, it shouldn't matter I guess..:) > It's better to clearly list down what configuration a particular entity in the system is responsible for. Doing partial updates her just makes issues harder to debug. Regards, Vaibhav
On Wednesday 06 November 2013 10:11 PM, Vaibhav Bedia wrote: > On Wed, Nov 6, 2013 at 8:32 AM, Lokesh Vutla <lokeshvutla@ti.com> wrote: >> On Wednesday 06 November 2013 06:13 PM, Vaibhav Bedia wrote: >>> On Mon, Nov 4, 2013 at 11:20 PM, Lokesh Vutla <lokeshvutla@ti.com> wrote: >>>> Updating the mux data for UART, and adding data for i2c0 and mmc. >>>> >>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> >>>> --- >>>> arch/arm/include/asm/arch-am33xx/mux_am43xx.h | 4 +++- >>>> board/ti/am43xx/mux.c | 24 ++++++++++++++++++++++-- >>>> 2 files changed, 25 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h >>>> index 0206912..e95efdd 100644 >>>> --- a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h >>>> +++ b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h >>>> @@ -16,7 +16,9 @@ >>>> __raw_writel(value, (CTRL_BASE + offset)); >>>> >>>> /* PAD Control Fields */ >>>> -#define SLEWCTRL (0x1 << 19) >>>> +#define DSPULLUDEN (0x1 << 27) /* DS0 mode Pull-Up/Down enable */ >>>> +#define DSPULLUDDIS (0x0 << 27) /* DS0 mode Pull-Up/Down Disable */ >>>> +#define SLEWCTRL (0x1 << 19) /* Slow slew rate selection */ >>>> #define RXACTIVE (0x1 << 18) >>>> #define PULLDOWN_EN (0x0 << 17) /* Pull Down Selection */ >>>> #define PULLUP_EN (0x1 << 17) /* Pull Up Selection */ >>>> diff --git a/board/ti/am43xx/mux.c b/board/ti/am43xx/mux.c >>>> index 700e9a7..818a046 100644 >>>> --- a/board/ti/am43xx/mux.c >>>> +++ b/board/ti/am43xx/mux.c >>>> @@ -12,8 +12,26 @@ >>>> #include "board.h" >>>> >>>> static struct module_pin_mux uart0_pin_mux[] = { >>>> - {OFFSET(uart0_rxd), (MODE(0) | RXACTIVE)}, /* UART0_RXD */ >>>> - {OFFSET(uart0_txd), (MODE(0))}, /* UART0_TXD */ >>>> + {OFFSET(uart0_rxd), >>>> + (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL | DSPULLUDEN)}, >>>> + {OFFSET(uart0_txd), >>>> + (MODE(0) | PULLUDDIS | PULLUP_EN | SLEWCTRL | DSPULLUDEN)}, >>>> + {-1}, >>>> +}; >>>> + >>>> +static struct module_pin_mux mmc0_pin_mux[] = { >>>> + {OFFSET(mmc0_clk), (MODE(0) | PULLUDDIS | RXACTIVE | DSPULLUDEN)}, >>>> + {OFFSET(mmc0_cmd), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>>> + {OFFSET(mmc0_dat0), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>>> + {OFFSET(mmc0_dat1), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>>> + {OFFSET(mmc0_dat2), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>>> + {OFFSET(mmc0_dat3), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, >>>> + {-1}, >>> >>> Hmm i don't think updating the DSPULL here is a good idea. Since not >>> all the pins >>> are used in U-Boot, this is just partially updating the pulls for the >>> low power state. >>> I would suggest leaving this bit for the kernel where things can be >>> updated without >>> updating the bootloader. >> These are the preferred settings given to me. >> Any way if kernel is updating it overwrites these settings, it shouldn't matter I guess..:) >> > It's better to clearly list down what configuration a particular > entity in the system is > responsible for. Doing partial updates her just makes issues harder to debug. Ok, Ill update.. Thanks and regards, Lokesh > > Regards, > Vaibhav >
diff --git a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h index 0206912..e95efdd 100644 --- a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h +++ b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h @@ -16,7 +16,9 @@ __raw_writel(value, (CTRL_BASE + offset)); /* PAD Control Fields */ -#define SLEWCTRL (0x1 << 19) +#define DSPULLUDEN (0x1 << 27) /* DS0 mode Pull-Up/Down enable */ +#define DSPULLUDDIS (0x0 << 27) /* DS0 mode Pull-Up/Down Disable */ +#define SLEWCTRL (0x1 << 19) /* Slow slew rate selection */ #define RXACTIVE (0x1 << 18) #define PULLDOWN_EN (0x0 << 17) /* Pull Down Selection */ #define PULLUP_EN (0x1 << 17) /* Pull Up Selection */ diff --git a/board/ti/am43xx/mux.c b/board/ti/am43xx/mux.c index 700e9a7..818a046 100644 --- a/board/ti/am43xx/mux.c +++ b/board/ti/am43xx/mux.c @@ -12,8 +12,26 @@ #include "board.h" static struct module_pin_mux uart0_pin_mux[] = { - {OFFSET(uart0_rxd), (MODE(0) | RXACTIVE)}, /* UART0_RXD */ - {OFFSET(uart0_txd), (MODE(0))}, /* UART0_TXD */ + {OFFSET(uart0_rxd), + (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL | DSPULLUDEN)}, + {OFFSET(uart0_txd), + (MODE(0) | PULLUDDIS | PULLUP_EN | SLEWCTRL | DSPULLUDEN)}, + {-1}, +}; + +static struct module_pin_mux mmc0_pin_mux[] = { + {OFFSET(mmc0_clk), (MODE(0) | PULLUDDIS | RXACTIVE | DSPULLUDEN)}, + {OFFSET(mmc0_cmd), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, + {OFFSET(mmc0_dat0), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, + {OFFSET(mmc0_dat1), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, + {OFFSET(mmc0_dat2), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, + {OFFSET(mmc0_dat3), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, + {-1}, +}; + +static struct module_pin_mux i2c0_pin_mux[] = { + {OFFSET(i2c0_sda), (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL)}, + {OFFSET(i2c0_scl), (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL)}, {-1}, }; @@ -24,4 +42,6 @@ void enable_uart0_pin_mux(void) void enable_board_pin_mux(void) { + configure_module_pin_mux(mmc0_pin_mux); + configure_module_pin_mux(i2c0_pin_mux); }
Updating the mux data for UART, and adding data for i2c0 and mmc. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> --- arch/arm/include/asm/arch-am33xx/mux_am43xx.h | 4 +++- board/ti/am43xx/mux.c | 24 ++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-)