[U-Boot] [PATCH 09/14] ARM: AM43xx: mux: Update mux data
Vaibhav Bedia
vaibhav.bedia at gmail.com
Wed Nov 6 17:41:04 CET 2013
On Wed, Nov 6, 2013 at 8:32 AM, Lokesh Vutla <lokeshvutla at 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 at ti.com> wrote:
>>> Updating the mux data for UART, and adding data for i2c0 and mmc.
>>>
>>> Signed-off-by: Lokesh Vutla <lokeshvutla at 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
More information about the U-Boot
mailing list