Skip to contentSkip to conversation

OMAP5: Add the Changes required for OMAP5 ES1.0 silicon

PATCH Superseded R Sricharan 3 participants 27 messages Mar 1, 2012 – Mar 8, 2012

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover OMAP5: Add the Changes required for OMAP5 ES1.0 silicon

OMAP5 soc support is already present in the mainline. The below are the changes that were identified during the actual silicon wakeup. Briefly, the changes address clocks, ddr, mux, poweric, mmc, io settings required/recommended for the ip. Couple of bug fixes are also added as a part of this series.

The series has been tested on
OMAP5430 ES1.0,
OMAP4 PANDA and SDP boards.

Changes from V1.
* Addressed comments from Tom Rini <tom [email protected]>
* Added a new patch OMAP5: reset: Use cold reset in case of 5430ES1.0

Balaji T K (3):
arm: omap5: correct boot device mode7 for eMMC
omap5: pbias ldo9 turn on
mmc: omap5evm: Add eMMC saveenv support

R Sricharan (15):
OMAP5: clocks: Change clock settings as required for ES1.0 silicon.
OMAP5: board: Add pinmux data for omap5_evm board.
OMAP5: io: Configure the io settings for omap5430 sevm board.
OMAP5: emif/ddr: Change emif settings as required for ES1.0 silicon.
OMAP5: palmas: Configure nominal opp vdd values
OMAP5: hwinit: Add the missing break statement
OMAP4/5: Make the silicon revision variable common.
OMAP5: SRAM: Change the SRAM base address.
OMAP4/5: Make the sysctrl structure common
OMAP4/5: device: Add support to get the device type.
OMAP5: defconfig: Align the defconfig for 5430 ES1.0
OMAP5: ddr: Change the ddr device name.
OMAP4/5: emif: Correct the emif power mgt shadow register bit fields.
power: twl6035: add palmas PMIC support
OMAP5: reset: Use cold reset in case of 5430ES1.0

 arch/arm/cpu/armv7/omap-common/clocks-common.c     |   38 +-
 arch/arm/cpu/armv7/omap-common/emif-common.c       |   41 ++-
 arch/arm/cpu/armv7/omap-common/hwinit-common.c     |    6 +-
 arch/arm/cpu/armv7/omap-common/reset.S             |    2 +
 arch/arm/cpu/armv7/omap-common/spl.c               |    1 +
 arch/arm/cpu/armv7/omap-common/spl_mmc.c           |    1 +
 arch/arm/cpu/armv7/omap4/clocks.c                  |   15 +
 arch/arm/cpu/armv7/omap4/hwinit.c                  |   24 +-
 arch/arm/cpu/armv7/omap4/sdram_elpida.c            |    4 +
 arch/arm/cpu/armv7/omap5/Makefile                  |    2 +-
 arch/arm/cpu/armv7/omap5/clocks.c                  |  140 ++++--
 arch/arm/cpu/armv7/omap5/hwinit.c                  |  106 ++++-
 .../cpu/armv7/omap5/{sdram_elpida.c => sdram.c}    |  101 +++--
 arch/arm/include/asm/arch-omap4/clocks.h           |    1 +
 arch/arm/include/asm/arch-omap4/omap.h             |   14 +-
 arch/arm/include/asm/arch-omap4/sys_proto.h        |    6 -
 arch/arm/include/asm/arch-omap5/clocks.h           |   35 +-
 arch/arm/include/asm/arch-omap5/mux_omap5.h        |  502 ++++++++++----------
 arch/arm/include/asm/arch-omap5/omap.h             |  142 +++++--
 arch/arm/include/asm/arch-omap5/sys_proto.h        |    6 -
 arch/arm/include/asm/emif.h                        |   76 +++-
 arch/arm/include/asm/omap_common.h                 |   11 +-
 board/ti/omap5_evm/evm.c                           |    6 +-
 board/ti/omap5_evm/mux_data.h                      |  489 ++++++++++---------
 drivers/mmc/omap_hsmmc.c                           |   37 ++-
 drivers/power/Makefile                             |    1 +
 drivers/power/twl6035.c                            |   65 +++
 include/configs/omap5_evm.h                        |   25 +-
 .../armv7/omap-common/reset.S => include/twl6035.h |   38 +-
 29 files changed, 1251 insertions(+), 684 deletions(-)
 rename arch/arm/cpu/armv7/omap5/{sdram_elpida.c => sdram.c} (64%)
 create mode 100644 drivers/power/twl6035.c
 copy arch/arm/cpu/armv7/omap-common/reset.S => include/twl6035.h (53%)
#1 lore raw

PATCH v2 1/18 OMAP5: clocks: Change clock settings as required for ES1.0 silicon.

Aligning all the clock related settings like the dpll frequencies, their respective clock outputs, etc to the ideal values recommended for OMAP5430 ES1.0 silicon.

---
 arch/arm/cpu/armv7/omap-common/clocks-common.c |    5 +
 arch/arm/cpu/armv7/omap5/clocks.c              |  109 ++++++++++++++++--------
 arch/arm/include/asm/arch-omap5/clocks.h       |   19 ++++-
 3 files changed, 94 insertions(+), 39 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +5 -0
index 4cfe119..5e30cd4 100644
@@ -245,6 +245,11 @@ void configure_mpu_dpll(void)
 			CM_CLKSEL_DCC_EN_MASK);
 	}
 
+	setbits_le32(&prcm->cm_mpu_mpu_clkctrl,
+		MPU_CLKCTRL_CLKSEL_EMIF_DIV_MODE_MASK);
+	setbits_le32(&prcm->cm_mpu_mpu_clkctrl,
+		MPU_CLKCTRL_CLKSEL_ABE_DIV_MODE_MASK);
+
 	params = get_mpu_dpll_params();
 
 	do_setup_dpll(&prcm->cm_clkmode_dpll_mpu, params, DPLL_LOCK, "mpu");
arch/arm/cpu/armv7/omap5/clocks.c +73 -36

183 lines not on this page · raw message

arch/arm/include/asm/arch-omap5/clocks.h +16 -3
index d0e6dd6..faed887 100644
@@ -473,9 +473,11 @@ struct omap5_prcm_regs {
 	u32 cm_wkup_rtc_clkctrl;		/* 4ae07880 */
 	u32 pad214;				/* 4ae07884 */
 	u32 cm_wkup_bandgap_clkctrl;		/* 4ae07888 */
-	u32 pad215[197];			/* 4ae0788c */
+	u32 pad215[1];				/* 4ae0788c */
+	u32 cm_wkupaon_scrm_clkctrl;		/* 4ae07890 */
+	u32 pad216[195];
 	u32 prm_vc_val_bypass;			/* 4ae07ba0 */
-	u32 pad216[4];
+	u32 pad217[4];
 	u32 prm_vc_cfg_i2c_mode;		/* 4ae07bb4 */
 	u32 prm_vc_cfg_i2c_clk;			/* 4ae07bb8 */
 };
@@ -514,6 +516,10 @@ struct omap5_prcm_regs {
 /* CM_IDLEST_DPLL fields */
 #define ST_DPLL_CLK_MASK		1
 
+/* SGX */
+#define CLKSEL_GPU_HYD_GCLK_MASK		(1 << 25)
+#define CLKSEL_GPU_CORE_GCLK_MASK		(1 << 24)
+
 /* CM_CLKSEL_DPLL */
 #define CM_CLKSEL_DPLL_DPLL_SD_DIV_SHIFT	24
 #define CM_CLKSEL_DPLL_DPLL_SD_DIV_MASK		(0xFF << 24)
@@ -591,6 +597,7 @@ struct omap5_prcm_regs {
 
 /* CM_L3INIT_HSMMCn_CLKCTRL */
 #define HSMMC_CLKCTRL_CLKSEL_MASK		(1 << 24)
+#define HSMMC_CLKCTRL_CLKSEL_DIV_MASK		(1 << 25)
 
 /* CM_WKUP_GPTIMER1_CLKCTRL */
 #define GPTIMER1_CLKCTRL_CLKSEL_MASK		(1 << 24)
@@ -610,6 +617,12 @@ struct omap5_prcm_regs {
 #define MPU_CLKCTRL_CLKSEL_ABE_DIV_MODE_SHIFT	25
 #define MPU_CLKCTRL_CLKSEL_ABE_DIV_MODE_MASK	(1 << 25)
 
+/* CM_WKUPAON_SCRM_CLKCTRL */
+#define OPTFCLKEN_SCRM_PER_SHIFT		9
+#define OPTFCLKEN_SCRM_PER_MASK			(1 << 9)
+#define OPTFCLKEN_SCRM_CORE_SHIFT		8
+#define OPTFCLKEN_SCRM_CORE_MASK		(1 << 8)
+
 /* Clock frequencies */
 #define OMAP_SYS_CLK_FREQ_38_4_MHZ	38400000
 #define OMAP_SYS_CLK_IND_38_4_MHZ	6
@@ -677,7 +690,7 @@ struct dpll_regs {
 	u32 cm_div_h12_dpll;
 	u32 cm_div_h13_dpll;
 	u32 cm_div_h14_dpll;
-	u32 reserved[2];
+	u32 reserved[3];
 	u32 cm_div_h22_dpll;
 	u32 cm_div_h23_dpll;
 };
Signature · 1 line
1.7.1
#2 lore raw

PATCH v2 2/18 OMAP5: board: Add pinmux data for omap5_evm board.

In reply to R Sricharan

Adding the full pinmux data for OMAP5430 sevm board.

---
 arch/arm/include/asm/arch-omap5/mux_omap5.h |  502 +++++++++++++--------------
 board/ti/omap5_evm/mux_data.h               |  489 ++++++++++++++------------
 2 files changed, 509 insertions(+), 482 deletions(-)
arch/arm/include/asm/arch-omap5/mux_omap5.h +250 -252
index b8c2185..993237b 100644
@@ -87,258 +87,256 @@ struct pad_conf_entry {
 #define CORE_REVISION		0x0000
 #define CORE_HWINFO		0x0004
 #define CORE_SYSCONFIG		0x0010
-#define GPMC_AD0		0x0040
-#define GPMC_AD1		0x0042
-#define GPMC_AD2		0x0044
-#define GPMC_AD3		0x0046
-#define GPMC_AD4		0x0048
-#define GPMC_AD5		0x004A
-#define GPMC_AD6		0x004C
-#define GPMC_AD7		0x004E
-#define GPMC_AD8		0x0050
-#define GPMC_AD9		0x0052
-#define GPMC_AD10		0x0054
-#define GPMC_AD11		0x0056
-#define GPMC_AD12		0x0058
-#define GPMC_AD13		0x005A
-#define GPMC_AD14		0x005C
-#define GPMC_AD15		0x005E
-#define GPMC_A16		0x0060
-#define GPMC_A17		0x0062
-#define GPMC_A18		0x0064
-#define GPMC_A19		0x0066
-#define GPMC_A20		0x0068
-#define GPMC_A21		0x006A
-#define GPMC_A22		0x006C
-#define GPMC_A23		0x006E
-#define GPMC_A24		0x0070
-#define GPMC_A25		0x0072
-#define GPMC_NCS0		0x0074
-#define GPMC_NCS1		0x0076
-#define GPMC_NCS2		0x0078
-#define GPMC_NCS3		0x007A
-#define GPMC_NWP		0x007C
-#define GPMC_CLK		0x007E
-#define GPMC_NADV_ALE		0x0080
-#define GPMC_NOE		0x0082
-#define GPMC_NWE		0x0084
-#define GPMC_NBE0_CLE		0x0086
-#define GPMC_NBE1		0x0088
-#define GPMC_WAIT0		0x008A
-#define GPMC_WAIT1		0x008C
-#define C2C_DATA11		0x008E
-#define C2C_DATA12		0x0090
-#define C2C_DATA13		0x0092
-#define C2C_DATA14		0x0094
-#define C2C_DATA15		0x0096
-#define HDMI_HPD		0x0098
-#define HDMI_CEC		0x009A
-#define HDMI_DDC_SCL		0x009C
-#define HDMI_DDC_SDA		0x009E
-#define CSI21_DX0		0x00A0
-#define CSI21_DY0		0x00A2
-#define CSI21_DX1		0x00A4
-#define CSI21_DY1		0x00A6
-#define CSI21_DX2		0x00A8
-#define CSI21_DY2		0x00AA
-#define CSI21_DX3		0x00AC
-#define CSI21_DY3		0x00AE
-#define CSI21_DX4		0x00B0
-#define CSI21_DY4		0x00B2
-#define CSI22_DX0		0x00B4
-#define CSI22_DY0		0x00B6
-#define CSI22_DX1		0x00B8
-#define CSI22_DY1		0x00BA
-#define CAM_SHUTTER		0x00BC
-#define CAM_STROBE		0x00BE
-#define CAM_GLOBALRESET		0x00C0
-#define USBB1_ULPITLL_CLK	0x00C2
-#define USBB1_ULPITLL_STP	0x00C4
-#define USBB1_ULPITLL_DIR	0x00C6
-#define USBB1_ULPITLL_NXT	0x00C8
-#define USBB1_ULPITLL_DAT0	0x00CA
-#define USBB1_ULPITLL_DAT1	0x00CC
-#define USBB1_ULPITLL_DAT2	0x00CE
-#define USBB1_ULPITLL_DAT3	0x00D0
-#define USBB1_ULPITLL_DAT4	0x00D2
-#define USBB1_ULPITLL_DAT5	0x00D4
-#define USBB1_ULPITLL_DAT6	0x00D6
-#define USBB1_ULPITLL_DAT7	0x00D8
-#define USBB1_HSIC_DATA		0x00DA
-#define USBB1_HSIC_STROBE	0x00DC
-#define USBC1_ICUSB_DP		0x00DE
-#define USBC1_ICUSB_DM		0x00E0
-#define SDMMC1_CLK		0x00E2
-#define SDMMC1_CMD		0x00E4
-#define SDMMC1_DAT0		0x00E6
-#define SDMMC1_DAT1		0x00E8
-#define SDMMC1_DAT2		0x00EA
-#define SDMMC1_DAT3		0x00EC
-#define SDMMC1_DAT4		0x00EE
-#define SDMMC1_DAT5		0x00F0
-#define SDMMC1_DAT6		0x00F2
-#define SDMMC1_DAT7		0x00F4
-#define ABE_MCBSP2_CLKX		0x00F6
-#define ABE_MCBSP2_DR		0x00F8
-#define ABE_MCBSP2_DX		0x00FA
-#define ABE_MCBSP2_FSX		0x00FC
-#define ABE_MCBSP1_CLKX		0x00FE
-#define ABE_MCBSP1_DR		0x0100
-#define ABE_MCBSP1_DX		0x0102
-#define ABE_MCBSP1_FSX		0x0104
-#define ABE_PDM_UL_DATA		0x0106
-#define ABE_PDM_DL_DATA		0x0108
-#define ABE_PDM_FRAME		0x010A
-#define ABE_PDM_LB_CLK		0x010C
-#define ABE_CLKS		0x010E
-#define ABE_DMIC_CLK1		0x0110
-#define ABE_DMIC_DIN1		0x0112
-#define ABE_DMIC_DIN2		0x0114
-#define ABE_DMIC_DIN3		0x0116
-#define UART2_CTS		0x0118
-#define UART2_RTS		0x011A
-#define UART2_RX		0x011C
-#define UART2_TX		0x011E
-#define HDQ_SIO			0x0120
-#define I2C1_SCL		0x0122
-#define I2C1_SDA		0x0124
-#define I2C2_SCL		0x0126
-#define I2C2_SDA		0x0128
-#define I2C3_SCL		0x012A
-#define I2C3_SDA		0x012C
-#define I2C4_SCL		0x012E
-#define I2C4_SDA		0x0130
-#define MCSPI1_CLK		0x0132
-#define MCSPI1_SOMI		0x0134
-#define MCSPI1_SIMO		0x0136
-#define MCSPI1_CS0		0x0138
-#define MCSPI1_CS1		0x013A
-#define MCSPI1_CS2		0x013C
-#define MCSPI1_CS3		0x013E
-#define UART3_CTS_RCTX		0x0140
-#define UART3_RTS_SD		0x0142
-#define UART3_RX_IRRX		0x0144
-#define UART3_TX_IRTX		0x0146
-#define SDMMC5_CLK		0x0148
-#define SDMMC5_CMD		0x014A
-#define SDMMC5_DAT0		0x014C
-#define SDMMC5_DAT1		0x014E
-#define SDMMC5_DAT2		0x0150
-#define SDMMC5_DAT3		0x0152
-#define MCSPI4_CLK		0x0154
-#define MCSPI4_SIMO		0x0156
-#define MCSPI4_SOMI		0x0158
-#define MCSPI4_CS0		0x015A
-#define UART4_RX		0x015C
-#define UART4_TX		0x015E
-#define USBB2_ULPITLL_CLK	0x0160
-#define USBB2_ULPITLL_STP	0x0162
-#define USBB2_ULPITLL_DIR	0x0164
-#define USBB2_ULPITLL_NXT	0x0166
-#define USBB2_ULPITLL_DAT0	0x0168
-#define USBB2_ULPITLL_DAT1	0x016A
-#define USBB2_ULPITLL_DAT2	0x016C
-#define USBB2_ULPITLL_DAT3	0x016E
-#define USBB2_ULPITLL_DAT4	0x0170
-#define USBB2_ULPITLL_DAT5	0x0172
-#define USBB2_ULPITLL_DAT6	0x0174
-#define USBB2_ULPITLL_DAT7	0x0176
-#define USBB2_HSIC_DATA		0x0178
-#define USBB2_HSIC_STROBE	0x017A
-#define UNIPRO_TX0		0x017C
-#define UNIPRO_TY0		0x017E
-#define UNIPRO_TX1		0x0180
-#define UNIPRO_TY1		0x0182
-#define UNIPRO_TX2		0x0184
-#define UNIPRO_TY2		0x0186
-#define UNIPRO_RX0		0x0188
-#define UNIPRO_RY0		0x018A
-#define UNIPRO_RX1		0x018C
-#define UNIPRO_RY1		0x018E
-#define UNIPRO_RX2		0x0190
-#define UNIPRO_RY2		0x0192
-#define USBA0_OTG_CE		0x0194
-#define USBA0_OTG_DP		0x0196
-#define USBA0_OTG_DM		0x0198
-#define FREF_CLK1_OUT		0x019A
-#define FREF_CLK2_OUT		0x019C
-#define SYS_NIRQ1		0x019E
-#define SYS_NIRQ2		0x01A0
-#define SYS_BOOT0		0x01A2
-#define SYS_BOOT1		0x01A4
-#define SYS_BOOT2		0x01A6
-#define SYS_BOOT3		0x01A8
-#define SYS_BOOT4		0x01AA
-#define SYS_BOOT5		0x01AC
-#define DPM_EMU0		0x01AE
-#define DPM_EMU1		0x01B0
-#define DPM_EMU2		0x01B2
-#define DPM_EMU3		0x01B4
-#define DPM_EMU4		0x01B6
-#define DPM_EMU5		0x01B8
-#define DPM_EMU6		0x01BA
-#define DPM_EMU7		0x01BC
-#define DPM_EMU8		0x01BE
-#define DPM_EMU9		0x01C0
-#define DPM_EMU10		0x01C2
-#define DPM_EMU11		0x01C4
-#define DPM_EMU12		0x01C6
-#define DPM_EMU13		0x01C8
-#define DPM_EMU14		0x01CA
-#define DPM_EMU15		0x01CC
-#define DPM_EMU16		0x01CE
-#define DPM_EMU17		0x01D0
-#define DPM_EMU18		0x01D2
-#define DPM_EMU19		0x01D4
-#define WAKEUPEVENT_0		0x01D8
-#define WAKEUPEVENT_1		0x01DC
-#define WAKEUPEVENT_2		0x01E0
-#define WAKEUPEVENT_3		0x01E4
-#define WAKEUPEVENT_4		0x01E8
-#define WAKEUPEVENT_5		0x01EC
-#define WAKEUPEVENT_6		0x01F0
+#define EMMC_CLK		0x0040
+#define EMMC_CMD		0x0042
+#define EMMC_DATA0		0x0044
+#define EMMC_DATA1		0x0046
+#define EMMC_DATA2		0x0048
+#define EMMC_DATA3		0x004a
+#define EMMC_DATA4		0x004c
+#define EMMC_DATA5		0x004e
+#define EMMC_DATA6		0x0050
+#define EMMC_DATA7		0x0052
+#define C2C_CLKOUT0		0x0054
+#define C2C_CLKOUT1		0x0056
+#define C2C_CLKIN0		0x0058
+#define C2C_CLKIN1		0x005a
+#define C2C_DATAIN0		0x005c
+#define C2C_DATAIN1		0x005e
+#define C2C_DATAIN2		0x0060
+#define C2C_DATAIN3		0x0062
+#define C2C_DATAIN4		0x0064
+#define C2C_DATAIN5		0x0066
+#define C2C_DATAIN6		0x0068
+#define C2C_DATAIN7		0x006a
+#define C2C_DATAOUT0		0x006c
+#define C2C_DATAOUT1		0x006e
+#define C2C_DATAOUT2		0x0070
+#define C2C_DATAOUT3		0x0072
+#define C2C_DATAOUT4		0x0074
+#define C2C_DATAOUT5		0x0076
+#define C2C_DATAOUT6		0x0078
+#define C2C_DATAOUT7		0x007a
+#define C2C_DATA8		0x007c
+#define C2C_DATA9		0x007e
+#define C2C_DATA10		0x0080
+#define C2C_DATA11		0x0082
+#define C2C_DATA12		0x0084
+#define C2C_DATA13		0x0086
+#define C2C_DATA14		0x0088
+#define C2C_DATA15		0x008a
+#define LLIA_WAKEREQOUT		0x008c
+#define LLIB_WAKEREQOUT		0x008e
+#define HSI1_ACREADY		0x0090
+#define HSI1_CAREADY		0x0092
+#define HSI1_ACWAKE		0x0094
+#define HSI1_CAWAKE		0x0096
+#define HSI1_ACFLAG		0x0098
+#define HSI1_ACDATA		0x009a
+#define HSI1_CAFLAG		0x009c
+#define HSI1_CADATA		0x009e
+#define UART1_TX		0x00a0
+#define UART1_CTS		0x00a2
+#define UART1_RX		0x00a4
+#define UART1_RTS		0x00a6
+#define HSI2_CAREADY		0x00a8
+#define HSI2_ACREADY		0x00aa
+#define HSI2_CAWAKE		0x00ac
+#define HSI2_ACWAKE		0x00ae
+#define HSI2_CAFLAG		0x00b0
+#define HSI2_CADATA		0x00b2
+#define HSI2_ACFLAG		0x00b4
+#define HSI2_ACDATA		0x00b6
+#define UART2_RTS		0x00b8
+#define UART2_CTS		0x00ba
+#define UART2_RX		0x00bc
+#define UART2_TX		0x00be
+#define USBB1_HSIC_STROBE	0x00c0
+#define USBB1_HSIC_DATA		0x00c2
+#define USBB2_HSIC_STROBE	0x00c4
+#define USBB2_HSIC_DATA		0x00c6
+#define TIMER10_PWM_EVT		0x00c8
+#define DSIPORTA_TE0		0x00ca
+#define DSIPORTA_LANE0X		0x00cc
+#define DSIPORTA_LANE0Y		0x00ce
+#define DSIPORTA_LANE1X		0x00d0
+#define DSIPORTA_LANE1Y		0x00d2
+#define DSIPORTA_LANE2X		0x00d4
+#define DSIPORTA_LANE2Y		0x00d6
+#define DSIPORTA_LANE3X		0x00d8
+#define DSIPORTA_LANE3Y		0x00da
+#define DSIPORTA_LANE4X		0x00dc
+#define DSIPORTA_LANE4Y		0x00de
+#define DSIPORTC_LANE0X		0x00e0
+#define DSIPORTC_LANE0Y		0x00e2
+#define DSIPORTC_LANE1X		0x00e4
+#define DSIPORTC_LANE1Y		0x00e6
+#define DSIPORTC_LANE2X		0x00e8
+#define DSIPORTC_LANE2Y		0x00ea
+#define DSIPORTC_LANE3X		0x00ec
+#define DSIPORTC_LANE3Y		0x00ee
+#define DSIPORTC_LANE4X		0x00f0
+#define DSIPORTC_LANE4Y		0x00f2
+#define DSIPORTC_TE0		0x00f4
+#define TIMER9_PWM_EVT		0x00f6
+#define I2C4_SCL		0x00f8
+#define I2C4_SDA		0x00fa
+#define MCSPI2_CLK		0x00fc
+#define MCSPI2_SIMO		0x00fe
+#define MCSPI2_SOMI		0x0100
+#define MCSPI2_CS0		0x0102
+#define RFBI_DATA15		0x0104
+#define RFBI_DATA14		0x0106
+#define RFBI_DATA13		0x0108
+#define RFBI_DATA12		0x010a
+#define RFBI_DATA11		0x010c
+#define RFBI_DATA10		0x010e
+#define RFBI_DATA9		0x0110
+#define RFBI_DATA8		0x0112
+#define RFBI_DATA7		0x0114
+#define RFBI_DATA6		0x0116
+#define RFBI_DATA5		0x0118
+#define RFBI_DATA4		0x011a
+#define RFBI_DATA3		0x011c
+#define RFBI_DATA2		0x011e
+#define RFBI_DATA1		0x0120
+#define RFBI_DATA0		0x0122
+#define RFBI_WE			0x0124
+#define RFBI_CS0		0x0126
+#define RFBI_A0			0x0128
+#define RFBI_RE			0x012a
+#define RFBI_HSYNC0		0x012c
+#define RFBI_TE_VSYNC0		0x012e
+#define GPIO6_182		0x0130
+#define GPIO6_183		0x0132
+#define GPIO6_184		0x0134
+#define GPIO6_185		0x0136
+#define GPIO6_186		0x0138
+#define GPIO6_187		0x013a
+#define HDMI_CEC		0x013c
+#define HDMI_HPD		0x013e
+#define HDMI_DDC_SCL		0x0140
+#define HDMI_DDC_SDA		0x0142
+#define CSIPORTC_LANE0X		0x0144
+#define CSIPORTC_LANE0Y		0x0146
+#define CSIPORTC_LANE1X		0x0148
+#define CSIPORTC_LANE1Y		0x014a
+#define CSIPORTB_LANE0X		0x014c
+#define CSIPORTB_LANE0Y		0x014e
+#define CSIPORTB_LANE1X		0x0150
+#define CSIPORTB_LANE1Y		0x0152
+#define CSIPORTB_LANE2X		0x0154
+#define CSIPORTB_LANE2Y		0x0156
+#define CSIPORTA_LANE0X		0x0158
+#define CSIPORTA_LANE0Y		0x015a
+#define CSIPORTA_LANE1X		0x015c
+#define CSIPORTA_LANE1Y		0x015e
+#define CSIPORTA_LANE2X		0x0160
+#define CSIPORTA_LANE2Y		0x0162
+#define CSIPORTA_LANE3X		0x0164
+#define CSIPORTA_LANE3Y		0x0166
+#define CSIPORTA_LANE4X		0x0168
+#define CSIPORTA_LANE4Y		0x016a
+#define CAM_SHUTTER		0x016c
+#define CAM_STROBE		0x016e
+#define CAM_GLOBALRESET		0x0170
+#define TIMER11_PWM_EVT		0x0172
+#define TIMER5_PWM_EVT		0x0174
+#define TIMER6_PWM_EVT		0x0176
+#define TIMER8_PWM_EVT		0x0178
+#define I2C3_SCL		0x017a
+#define I2C3_SDA		0x017c
+#define GPIO8_233		0x017e
+#define GPIO8_234		0x0180
+#define ABE_CLKS		0x0182
+#define ABEDMIC_DIN1		0x0184
+#define ABEDMIC_DIN2		0x0186
+#define ABEDMIC_DIN3		0x0188
+#define ABEDMIC_CLK1		0x018a
+#define ABEDMIC_CLK2		0x018c
+#define ABEDMIC_CLK3		0x018e
+#define ABESLIMBUS1_CLOCK	0x0190
+#define ABESLIMBUS1_DATA	0x0192
+#define ABEMCBSP2_DR		0x0194
+#define ABEMCBSP2_DX		0x0196
+#define ABEMCBSP2_FSX		0x0198
+#define ABEMCBSP2_CLKX		0x019a
+#define ABEMCPDM_UL_DATA	0x019c
+#define ABEMCPDM_DL_DATA	0x019e
+#define ABEMCPDM_FRAME		0x01a0
+#define ABEMCPDM_LB_CLK		0x01a2
+#define WLSDIO_CLK		0x01a4
+#define WLSDIO_CMD		0x01a6
+#define WLSDIO_DATA0		0x01a8
+#define WLSDIO_DATA1		0x01aa
+#define WLSDIO_DATA2		0x01ac
+#define WLSDIO_DATA3		0x01ae
+#define UART5_RX		0x01b0
+#define UART5_TX		0x01b2
+#define UART5_CTS		0x01b4
+#define UART5_RTS		0x01b6
+#define I2C2_SCL		0x01b8
+#define I2C2_SDA		0x01ba
+#define MCSPI1_CLK		0x01bc
+#define MCSPI1_SOMI		0x01be
+#define MCSPI1_SIMO		0x01c0
+#define MCSPI1_CS0		0x01c2
+#define MCSPI1_CS1		0x01c4
+#define I2C5_SCL		0x01c6
+#define I2C5_SDA		0x01c8
+#define PERSLIMBUS2_CLOCK	0x01ca
+#define PERSLIMBUS2_DATA	0x01cc
+#define UART6_TX		0x01ce
+#define UART6_RX		0x01d0
+#define UART6_CTS		0x01d2
+#define UART6_RTS		0x01d4
+#define UART3_CTS_RCTX		0x01d6
+#define UART3_RTS_IRSD		0x01d8
+#define UART3_TX_IRTX		0x01da
+#define UART3_RX_IRRX		0x01dc
+#define USBB3_HSIC_STROBE	0x01de
+#define USBB3_HSIC_DATA		0x01e0
+#define SDCARD_CLK		0x01e2
+#define SDCARD_CMD		0x01e4
+#define SDCARD_DATA2		0x01e6
+#define SDCARD_DATA3		0x01e8
+#define SDCARD_DATA0		0x01ea
+#define SDCARD_DATA1		0x01ec
+#define USBD0_HS_DP		0x01ee
+#define USBD0_HS_DM		0x01f0
+#define I2C1_PMIC_SCL		0x01f2
+#define I2C1_PMIC_SDA		0x01f4
+#define USBD0_SS_RX		0x01f6
 
-#define WKUP_REVISION		0x0000
-#define WKUP_HWINFO		0x0004
-#define WKUP_SYSCONFIG		0x0010
-#define PAD0_SIM_IO		0x0040
-#define PAD1_SIM_CLK		0x0042
-#define PAD0_SIM_RESET		0x0044
-#define PAD1_SIM_CD		0x0046
-#define PAD0_SIM_PWRCTRL		0x0048
-#define PAD1_SR_SCL		0x004A
-#define PAD0_SR_SDA		0x004C
-#define PAD1_FREF_XTAL_IN		0x004E
-#define PAD0_FREF_SLICER_IN	0x0050
-#define PAD1_FREF_CLK_IOREQ	0x0052
-#define PAD0_FREF_CLK0_OUT		0x0054
-#define PAD1_FREF_CLK3_REQ		0x0056
-#define PAD0_FREF_CLK3_OUT		0x0058
-#define PAD1_FREF_CLK4_REQ		0x005A
-#define PAD0_FREF_CLK4_OUT		0x005C
-#define PAD1_SYS_32K		0x005E
-#define PAD0_SYS_NRESPWRON		0x0060
-#define PAD1_SYS_NRESWARM		0x0062
-#define PAD0_SYS_PWR_REQ		0x0064
-#define PAD1_SYS_PWRON_RESET	0x0066
-#define PAD0_SYS_BOOT6		0x0068
-#define PAD1_SYS_BOOT7		0x006A
-#define PAD0_JTAG_NTRST		0x006C
-#define PAD1_JTAG_TCK		0x006D
-#define PAD0_JTAG_RTCK		0x0070
-#define PAD1_JTAG_TMS_TMSC		0x0072
-#define PAD0_JTAG_TDI		0x0074
-#define PAD1_JTAG_TDO		0x0076
-#define PADCONF_WAKEUPEVENT_0	0x007C
-#define CONTROL_SMART1NOPMIO_PADCONF_0		0x05A0
-#define CONTROL_SMART1NOPMIO_PADCONF_1		0x05A4
-#define PADCONF_MODE		0x05A8
-#define CONTROL_XTAL_OSCILLATOR			0x05AC
-#define CONTROL_CONTROL_I2C_2			0x0604
-#define CONTROL_CONTROL_JTAG			0x0608
-#define CONTROL_CONTROL_SYS			0x060C
-#define CONTROL_SPARE_RW		0x0614
-#define CONTROL_SPARE_R		0x0618
-#define CONTROL_SPARE_R_C0		0x061C
+#define LLIA_WAKEREQIN		0x0040
+#define LLIB_WAKEREQIN		0x0042
+#define DRM_EMU0		0x0044
+#define DRM_EMU1		0x0046
+#define JTAG_NTRST		0x0048
+#define JTAG_TCK		0x004a
+#define JTAG_RTCK		0x004c
+#define JTAG_TMSC		0x004e
+#define JTAG_TDI		0x0050
+#define JTAG_TDO		0x0052
+#define SYS_32K			0x0054
+#define FREF_CLK_IOREQ		0x0056
+#define FREF_CLK0_OUT		0x0058
+#define FREF_CLK1_OUT		0x005a
+#define FREF_CLK2_OUT		0x005c
+#define FREF_CLK2_REQ		0x005e
+#define FREF_CLK1_REQ		0x0060
+#define SYS_NRESPWRON		0x0062
+#define SYS_NRESWARM		0x0064
+#define SYS_PWR_REQ		0x0066
+#define SYS_NIRQ1		0x0068
+#define SYS_NIRQ2		0x006a
+#define SR_PMIC_SCL		0x006c
+#define SR_PMIC_SDA		0x006e
+#define SYS_BOOT0		0x0070
+#define SYS_BOOT1		0x0072
+#define SYS_BOOT2		0x0074
+#define SYS_BOOT3		0x0076
+#define SYS_BOOT4		0x0078
+#define SYS_BOOT5		0x007a
 
 #endif /* _MUX_OMAP5_H_ */
board/ti/omap5_evm/mux_data.h +259 -230

513 lines not on this page · raw message

Signature · 1 line
1.7.1
#3 lore raw

PATCH v2 3/18 OMAP5: io: Configure the io settings for omap5430 sevm board.

In reply to R Sricharan

The control module provides options to set various signal integrity parameters like the output impedance, slew rate, load capacitance for different pad groups. Configure these as required for the omap5430 sevm board.

---
 arch/arm/cpu/armv7/omap5/hwinit.c      |   83 +++++++++++++++++++++
 arch/arm/include/asm/arch-omap5/omap.h |  128 ++++++++++++++++++++++++++------
 2 files changed, 187 insertions(+), 24 deletions(-)
arch/arm/cpu/armv7/omap5/hwinit.c +83 -0
index fa8e390..d024ab5 100644
@@ -57,6 +57,89 @@ const struct gpio_bank *const omap_gpio_bank = gpio_bank_54xx;
  */
 void do_io_settings(void)
 {
+	u32 io_settings = 0, mask = 0;
+	struct omap5_sys_ctrl_regs *ioregs_base =
+			(struct omap5_sys_ctrl_regs *) OMAP5_IOREGS_BASE;
+
+	/* Impedance settings EMMC, C2C 1,2, hsi2 */
+	mask = (ds_mask << 2) | (ds_mask << 8) |
+		(ds_mask << 16) | (ds_mask << 18);
+	io_settings = readl(&(ioregs_base->control_smart1io_padconf_0)) &
+				(~mask);
+	io_settings |= (ds_60_ohm << 8) | (ds_45_ohm << 16) |
+			(ds_45_ohm << 18) | (ds_60_ohm << 2);
+	writel(io_settings, &(ioregs_base->control_smart1io_padconf_0));
+
+	/* Impedance settings Mcspi2 */
+	mask = (ds_mask << 30);
+	io_settings = readl(&(ioregs_base->control_smart1io_padconf_1)) &
+			(~mask);
+	io_settings |= (ds_60_ohm << 30);
+	writel(io_settings, &(ioregs_base->control_smart1io_padconf_1));
+
+	/* Impedance settings C2C 3,4 */
+	mask = (ds_mask << 14) | (ds_mask << 16);
+	io_settings = readl(&(ioregs_base->control_smart1io_padconf_2)) &
+			(~mask);
+	io_settings |= (ds_45_ohm << 14) | (ds_45_ohm << 16);
+	writel(io_settings, &(ioregs_base->control_smart1io_padconf_2));
+
+	/* Slew rate settings EMMC, C2C 1,2 */
+	mask = (sc_mask << 8) | (sc_mask << 16) | (sc_mask << 18);
+	io_settings = readl(&(ioregs_base->control_smart2io_padconf_0)) &
+			(~mask);
+	io_settings |= (sc_fast << 8) | (sc_na << 16) | (sc_na << 18);
+	writel(io_settings, &(ioregs_base->control_smart2io_padconf_0));
+
+	/* Slew rate settings hsi2, Mcspi2 */
+	mask = (sc_mask << 24) | (sc_mask << 28);
+	io_settings = readl(&(ioregs_base->control_smart2io_padconf_1)) &
+			(~mask);
+	io_settings |= (sc_fast << 28) | (sc_fast << 24);
+	writel(io_settings, &(ioregs_base->control_smart2io_padconf_1));
+
+	/* Slew rate settings C2C 3,4 */
+	mask = (sc_mask << 16) | (sc_mask << 18);
+	io_settings = readl(&(ioregs_base->control_smart2io_padconf_2)) &
+			(~mask);
+	io_settings |= (sc_na << 16) | (sc_na << 18);
+	writel(io_settings, &(ioregs_base->control_smart2io_padconf_2));
+
+	/* impedance and slew rate settings for usb */
+	mask = (usb_i_mask << 29) | (usb_i_mask << 26) | (usb_i_mask << 23) |
+		(usb_i_mask << 20) | (usb_i_mask << 17) | (usb_i_mask << 14);
+	io_settings = readl(&(ioregs_base->control_smart3io_padconf_1)) &
+			(~mask);
+	io_settings |= (ds_60_ohm << 29) | (ds_60_ohm << 26) |
+		       (ds_60_ohm << 23) | (sc_fast << 20) |
+		       (sc_fast << 17) | (sc_fast << 14);
+	writel(io_settings, &(ioregs_base->control_smart3io_padconf_1));
+
+	/* LPDDR2 io settings */
+	writel(DDR_IO_I_34OHM_SR_FASTEST_WD_DQ_NO_PULL_DQS_PULL_DOWN,
+					&(ioregs_base->control_ddrch1_0));
+	writel(DDR_IO_I_34OHM_SR_FASTEST_WD_DQ_NO_PULL_DQS_PULL_DOWN,
+					&(ioregs_base->control_ddrch1_1));
+	writel(DDR_IO_I_34OHM_SR_FASTEST_WD_DQ_NO_PULL_DQS_PULL_DOWN,
+					&(ioregs_base->control_ddrch2_0));
+	writel(DDR_IO_I_34OHM_SR_FASTEST_WD_DQ_NO_PULL_DQS_PULL_DOWN,
+					&(ioregs_base->control_ddrch2_1));
+	writel(DDR_IO_I_34OHM_SR_FASTEST_WD_CK_CKE_NCS_CA_PULL_DOWN,
+					&(ioregs_base->control_lpddr2ch1_0));
+	writel(DDR_IO_I_34OHM_SR_FASTEST_WD_CK_CKE_NCS_CA_PULL_DOWN,
+					&(ioregs_base->control_lpddr2ch1_1));
+	writel(DDR_IO_0_DDR2_DQ_INT_EN_ALL_DDR3_CA_DIS_ALL,
+					&(ioregs_base->control_ddrio_0));
+	writel(DDR_IO_1_DQ_OUT_EN_ALL_DQ_INT_EN_ALL,
+					&(ioregs_base->control_ddrio_1));
+	writel(DDR_IO_2_CA_OUT_EN_ALL_CA_INT_EN_ALL,
+					&(ioregs_base->control_ddrio_2));
+
+	/* Efuse settings */
+	writel(EFUSE_1, &(ioregs_base->control_efuse_1));
+	writel(EFUSE_2, &(ioregs_base->control_efuse_2));
+	writel(EFUSE_3, &(ioregs_base->control_efuse_3));
+	writel(EFUSE_4, &(ioregs_base->control_efuse_4));
 }
 #endif
 
arch/arm/include/asm/arch-omap5/omap.h +104 -24

136 lines not on this page · raw message

Signature · 1 line
1.7.1
#4 lore raw

PATCH v2 4/18 OMAP5: emif/ddr: Change emif settings as required for ES1.0 silicon.

In reply to R Sricharan

The OMAP5 silicon has new DDR PHY design, which includes a external PHY as well. So configuring the ext PHY parameters here. Also the EMIF timimg registers and a couple of DDR mode registers needs to be updated based on the testing from the actual silicon.

---
 arch/arm/cpu/armv7/omap-common/clocks-common.c |   18 ++++--
 arch/arm/cpu/armv7/omap-common/emif-common.c   |   41 +++++++++++-
 arch/arm/cpu/armv7/omap4/sdram_elpida.c        |    4 +
 arch/arm/cpu/armv7/omap5/sdram_elpida.c        |   81 ++++++++++++++++++------
 arch/arm/include/asm/emif.h                    |   72 ++++++++++++++++++++-
 5 files changed, 188 insertions(+), 28 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +13 -5
index 5e30cd4..20029b5 100644
@@ -459,6 +459,7 @@ void freq_update_core(void)
 {
 	u32 freq_config1 = 0;
 	const struct dpll_params *core_dpll_params;
+	u32 omap_rev = omap_revision();
 
 	core_dpll_params = get_core_dpll_params();
 	/* Put EMIF clock domain in sw wakeup mode */
@@ -484,11 +485,18 @@ void freq_update_core(void)
 		hang();
 	}
 
-	/* Put EMIF clock domain back in hw auto mode */
-	enable_clock_domain(&prcm->cm_memif_clkstctrl,
-				CD_CLKCTRL_CLKTRCTRL_HW_AUTO);
-	wait_for_clk_enable(&prcm->cm_memif_emif_1_clkctrl);
-	wait_for_clk_enable(&prcm->cm_memif_emif_2_clkctrl);
+	/*
+	 * Putting EMIF in HW_AUTO is seen to be causing issues with
+	 * EMIF clocks and the master DLL. Put EMIF in SW_WKUP
+	 * in OMAP5430 ES1.0 silicon
+	 */
+	if (omap_rev != OMAP5430_ES1_0) {
+		/* Put EMIF clock domain back in hw auto mode */
+		enable_clock_domain(&prcm->cm_memif_clkstctrl,
+					CD_CLKCTRL_CLKTRCTRL_HW_AUTO);
+		wait_for_clk_enable(&prcm->cm_memif_emif_1_clkctrl);
+		wait_for_clk_enable(&prcm->cm_memif_emif_2_clkctrl);
+	}
 }
 
 void bypass_dpll(u32 *const base)
arch/arm/cpu/armv7/omap-common/emif-common.c +39 -2

66 lines not on this page · raw message

arch/arm/cpu/armv7/omap4/sdram_elpida.c +4 -0
index a5ec7d3..b538960 100644
@@ -89,6 +89,10 @@ const struct emif_regs emif_regs_elpida_400_mhz_2cs = {
 	.emif_ddr_phy_ctlr_1_init	= 0x049ffff5,
 	.emif_ddr_phy_ctlr_1		= 0x049ff418
 };
+
+/* Dummy registers for OMAP44xx */
+const u32 ext_phy_ctrl_const_base[EMIF_EXT_PHY_CTRL_CONST_REG];
+
 const struct dmm_lisa_map_regs lisa_map_2G_x_1_x_2 = {
 	.dmm_lisa_map_0 = 0xFF020100,
 	.dmm_lisa_map_1 = 0,
arch/arm/cpu/armv7/omap5/sdram_elpida.c +62 -19

116 lines not on this page · raw message

arch/arm/include/asm/emif.h +70 -2

118 lines not on this page · raw message

Signature · 1 line
1.7.1
#5 lore raw

PATCH v2 5/18 OMAP5: palmas: Configure nominal opp vdd values

In reply to R Sricharan

The nominal opp vdd values as recommended for ES1.0 silicon is set for mpu, core, mm domains using palmas.

---
 arch/arm/cpu/armv7/omap-common/clocks-common.c |   15 +++--------
 arch/arm/cpu/armv7/omap4/clocks.c              |   15 +++++++++++
 arch/arm/cpu/armv7/omap5/clocks.c              |   31 +++++++++++++++++-------
 arch/arm/include/asm/arch-omap4/clocks.h       |    1 +
 arch/arm/include/asm/arch-omap5/clocks.h       |   16 ++++++++----
 5 files changed, 53 insertions(+), 25 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +4 -11
index 20029b5..cc4e538 100644
@@ -390,23 +390,16 @@ void do_scale_tps62361(u32 reg, u32 volt_mv)
 void do_scale_vcore(u32 vcore_reg, u32 volt_mv)
 {
 	u32 temp, offset_code;
-	u32 step = 12660; /* 12.66 mV represented in uV */
+
 	u32 offset = volt_mv;
 
 	/* convert to uV for better accuracy in the calculations */
 	offset *= 1000;
 
-	if (omap_revision() == OMAP4430_ES1_0)
-		offset -= PHOENIX_SMPS_BASE_VOLT_STD_MODE_UV;
-	else
-		offset -= PHOENIX_SMPS_BASE_VOLT_STD_MODE_WITH_OFFSET_UV;
-
-	offset_code = (offset + step - 1) / step;
-	/* The code starts at 1 not 0 */
-	offset_code++;
+	offset_code = get_offset_code(offset);
 
-	debug("do_scale_vcore: volt - %d offset_code - 0x%x\n", volt_mv,
-		offset_code);
+	debug("do_scale_vcore: vcore_reg - 0x%x volt - %d offset_code - 0x%x\n",
+		vcore_reg, volt_mv, offset_code);
 
 	temp = SMPS_I2C_SLAVE_ADDR |
 	    (vcore_reg << PRM_VC_VAL_BYPASS_REGADDR_SHIFT) |
arch/arm/cpu/armv7/omap4/clocks.c +15 -0
index e2189f7..98e179d 100644
@@ -318,6 +318,21 @@ void scale_vcores(void)
 	}
 }
 
+u32 get_offset_code(u32 offset)
+{
+	u32 offset_code, step = 12660; /* 12.66 mV represented in uV */
+
+	if (omap_revision() == OMAP4430_ES1_0)
+		offset -= PHOENIX_SMPS_BASE_VOLT_STD_MODE_UV;
+	else
+		offset -= PHOENIX_SMPS_BASE_VOLT_STD_MODE_WITH_OFFSET_UV;
+
+	offset_code = (offset + step - 1) / step;
+
+	/* The code starts@1 not 0 */
+	return ++offset_code;
+}
+
 /*
  * Enable essential clock domains, modules and
  * do some additional special settings needed
arch/arm/cpu/armv7/omap5/clocks.c +22 -9
index 4d1bc56..8c010d4 100644
@@ -264,17 +264,30 @@ void scale_vcores(void)
 
 	setup_sri2c();
 
-	/* Enable 1.22V from TPS for vdd_mpu */
-	volt = 1220;
-	do_scale_tps62361(TPS62361_REG_ADDR_SET1, volt);
+	/* Palmas settings */
+	volt = VDD_MPU;
+	do_scale_vcore(SMPS_REG_ADDR_12_MPU, volt);
 
-	/* VCORE 1 - for vdd_core */
-	volt = 1000;
-	do_scale_vcore(SMPS_REG_ADDR_VCORE1, volt);
+	volt = VDD_MM;
+	do_scale_vcore(SMPS_REG_ADDR_45_IVA, volt);
 
-	/* VCORE 2 - for vdd_MM */
-	volt = 1125;
-	do_scale_vcore(SMPS_REG_ADDR_VCORE2, volt);
+	volt = VDD_CORE;
+	do_scale_vcore(SMPS_REG_ADDR_8_CORE, volt);
+}
+
+u32 get_offset_code(u32 volt_offset)
+{
+	u32 offset_code, step = 10000; /* 10 mV represented in uV */
+
+	volt_offset -= PALMAS_SMPS_BASE_VOLT_UV;
+
+	offset_code = (volt_offset + step - 1) / step;
+
+	/*
+	 * Offset codes 1-6 all give the base voltage in Palmas
+	 * Offset code 0 switches OFF the SMPS
+	 */
+	return offset_code + 6;
 }
 
 /*
arch/arm/include/asm/arch-omap4/clocks.h +1 -0
index cd304e8..e52595b 100644
@@ -754,6 +754,7 @@ extern struct omap4_prcm_regs *const prcm;
 extern const u32 sys_clk_array[8];
 
 void scale_vcores(void);
+u32 get_offset_code(u32 offset);
 void do_scale_tps62361(u32 reg, u32 volt_mv);
 u32 omap_ddr_clk(void);
 void do_scale_vcore(u32 vcore_reg, u32 volt_mv);
arch/arm/include/asm/arch-omap5/clocks.h +11 -5
index faed887..b36638e 100644
@@ -647,12 +647,17 @@ struct omap5_prcm_regs {
 
 /* SMPS */
 #define SMPS_I2C_SLAVE_ADDR	0x12
-#define SMPS_REG_ADDR_VCORE1	0x55
-#define SMPS_REG_ADDR_VCORE2	0x5B
-#define SMPS_REG_ADDR_VCORE3	0x61
+#define SMPS_REG_ADDR_12_MPU	0x23
+#define SMPS_REG_ADDR_45_IVA	0x2B
+#define SMPS_REG_ADDR_8_CORE	0x37
 
-#define PHOENIX_SMPS_BASE_VOLT_STD_MODE_UV		607700
-#define PHOENIX_SMPS_BASE_VOLT_STD_MODE_WITH_OFFSET_UV	709000
+/* PALMAS VOLTAGE SETTINGS in mv for OPP_NOMINAL */
+#define VDD_MPU		1000
+#define VDD_MM		1000
+#define VDD_CORE	1040
+
+/* Standard offset is 0.5v expressed in uv */
+#define PALMAS_SMPS_BASE_VOLT_UV 500000
 
 /* TPS */
 #define TPS62361_I2C_SLAVE_ADDR		0x60
@@ -713,6 +718,7 @@ extern struct omap5_prcm_regs *const prcm;
 extern const u32 sys_clk_array[8];
 
 void scale_vcores(void);
+u32 get_offset_code(u32 offset);
 void do_scale_tps62361(u32 reg, u32 volt_mv);
 u32 omap_ddr_clk(void);
 void do_scale_vcore(u32 vcore_reg, u32 volt_mv);
Signature · 1 line
1.7.1
#6 lore raw

PATCH v2 5/18 OMAP5: palmas: Configure nominal opp vdd values

Quoted 2 lines · R Sricharan

The nominal opp vdd values as recommended for ES1.0 silicon is set for mpu, core, mm domains using palmas.

OK, this creates some trivial conflicts with
http://patchwork.ozlabs.org/patch/144137/ but also raises a functional problem / question. Is this patch also changing the order to match what Nishanth did or does this patch also need that functional change done (and a v3) ? Thanks!

Signature · 1 line
Tom
#7 lore raw

PATCH v2 5/18 OMAP5: palmas: Configure nominal opp vdd values

Quoted 10 lines · Tom Rini
Quoted 2 lines · R Sricharan

The nominal opp vdd values as recommended for ES1.0 silicon is set for mpu, core, mm domains using palmas.

OK, this creates some trivial conflicts with
http://patchwork.ozlabs.org/patch/144137/ but also raises a functional problem / question. ?Is this patch also changing the order to match what Nishanth did or does this patch also need that functional change done (and a v3) ? ?Thanks!

Glancing at this patch, I see that scale sequence is still mpu, core, MM - which is what my sequence fixes. will be nice to have the sequence fixed followed by cleanup/update to retain the sequence appropriately.

+ /* Palmas settings */
+ volt = VDD_MPU;
+ do_scale_vcore(SMPS_REG_ADDR_12_MPU, volt);

- /* VCORE 1 - for vdd_core */
- volt = 1000;
- do_scale_vcore(SMPS_REG_ADDR_VCORE1, volt);
+ volt = VDD_MM;
+ do_scale_vcore(SMPS_REG_ADDR_45_IVA, volt);

- /* VCORE 2 - for vdd_MM */
- volt = 1125;
- do_scale_vcore(SMPS_REG_ADDR_VCORE2, volt);
+ volt = VDD_CORE;
+ do_scale_vcore(SMPS_REG_ADDR_8_CORE, volt);

Regards,
Nishanth Menon

#8 lore raw

PATCH v2 5/18 OMAP5: palmas: Configure nominal opp vdd values

Quoted 26 lines · Nishanth
Quoted 10 lines · Tom Rini
Quoted 2 lines · R Sricharan

The nominal opp vdd values as recommended for ES1.0 silicon is set for mpu, core, mm domains using palmas.

OK, this creates some trivial conflicts with
http://patchwork.ozlabs.org/patch/144137/ but also raises a functional problem / question. ?Is this patch also changing the order to match what Nishanth did or does this patch also need that functional change done (and a v3) ? ?Thanks!

Glancing at this patch, I see that scale sequence is still mpu, core, MM - which is what my sequence fixes. will be nice to have the sequence fixed followed by cleanup/update to retain the sequence appropriately.

+ ? ? ? /* Palmas settings */
+ ? ? ? volt = VDD_MPU;
+ ? ? ? do_scale_vcore(SMPS_REG_ADDR_12_MPU, volt);

- ? ? ? /* VCORE 1 - for vdd_core */
- ? ? ? volt = 1000;
- ? ? ? do_scale_vcore(SMPS_REG_ADDR_VCORE1, volt);
+ ? ? ? volt = VDD_MM;
+ ? ? ? do_scale_vcore(SMPS_REG_ADDR_45_IVA, volt);

Quoted 5 lines

- ? ? ? /* VCORE 2 - for vdd_MM */
- ? ? ? volt = 1125;
- ? ? ? do_scale_vcore(SMPS_REG_ADDR_VCORE2, volt);
+ ? ? ? volt = VDD_CORE;
+ ? ? ? do_scale_vcore(SMPS_REG_ADDR_8_CORE, volt);

I think what might be easiest all around is to drop Nishanth's 4/4 and have patch 5 here correct the order as well, crediting Nishanth for the fix. Alternatively, respin the series, depending on Nishanth's series being applied. Thanks.

Signature · 1 line
Tom
#9 lore raw

PATCH v2 5/18 OMAP5: palmas: Configure nominal opp vdd values

Quoted 33 lines · Tom Rini
Quoted 26 lines · Nishanth
Quoted 10 lines · Tom Rini
Quoted 2 lines · R Sricharan

The nominal opp vdd values as recommended for ES1.0 silicon is set for mpu, core, mm domains using palmas.

OK, this creates some trivial conflicts with
http://patchwork.ozlabs.org/patch/144137/ but also raises a functional problem / question. ?Is this patch also changing the order to match what Nishanth did or does this patch also need that functional change done (and a v3) ? ?Thanks!

Glancing at this patch, I see that scale sequence is still mpu, core, MM - which is what my sequence fixes. will be nice to have the sequence fixed followed by cleanup/update to retain the sequence appropriately.

+ ? ? ? /* Palmas settings */
+ ? ? ? volt = VDD_MPU;
+ ? ? ? do_scale_vcore(SMPS_REG_ADDR_12_MPU, volt);

- ? ? ? /* VCORE 1 - for vdd_core */
- ? ? ? volt = 1000;
- ? ? ? do_scale_vcore(SMPS_REG_ADDR_VCORE1, volt);
+ ? ? ? volt = VDD_MM;
+ ? ? ? do_scale_vcore(SMPS_REG_ADDR_45_IVA, volt);

Quoted 5 lines

- ? ? ? /* VCORE 2 - for vdd_MM */
- ? ? ? volt = 1125;
- ? ? ? do_scale_vcore(SMPS_REG_ADDR_VCORE2, volt);
+ ? ? ? volt = VDD_CORE;
+ ? ? ? do_scale_vcore(SMPS_REG_ADDR_8_CORE, volt);

Quoted 4 lines

I think what might be easiest all around is to drop Nishanth's 4/4 and have patch 5 here correct the order as well, crediting Nishanth for the fix. ?Alternatively, respin the series, depending on Nishanth's series being applied. ?Thanks.

ok with either. might be good to merge my patch 5 here so that #patches are reduced :)

Regards,
Nishanth Menon

#10 lore raw

PATCH v2 5/18 OMAP5: palmas: Configure nominal opp vdd values

In reply to Tom Rini

Hi,

Quoted 45 lines

-----Original Message-----
From: tom.rini at gmail.com [mailto:tom.rini at gmail.com] On Behalf Of Tom Rini
Sent: Thursday, March 08, 2012 2:04 AM
To: Menon, Nishanth; sricharan
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V2 05/18] OMAP5: palmas: Configure nominal opp vdd values

Quoted 8 lines · Nishanth
Quoted 7 lines · Tom Rini
Quoted 2 lines · R Sricharan

The nominal opp vdd values as recommended for ES1.0 silicon is set for mpu, core, mm domains using palmas.

OK, this creates some trivial conflicts with
http://patchwork.ozlabs.org/patch/144137/ but also raises a

functional

Quoted 1 line
Quoted 1 line

problem / question. ?Is this patch also changing the order to match

what

Quoted 1 line
Quoted 1 line

Nishanth did or does this patch also need that functional change

done

Quoted 16 lines
Quoted 1 line

(and a v3) ? ?Thanks!

Glancing at this patch, I see that scale sequence is still mpu, core, MM - which is what my sequence fixes. will be nice to have the sequence fixed followed by cleanup/update to retain the sequence appropriately.

+ ? ? ? /* Palmas settings */
+ ? ? ? volt = VDD_MPU;
+ ? ? ? do_scale_vcore(SMPS_REG_ADDR_12_MPU, volt);

- ? ? ? /* VCORE 1 - for vdd_core */
- ? ? ? volt = 1000;
- ? ? ? do_scale_vcore(SMPS_REG_ADDR_VCORE1, volt);
+ ? ? ? volt = VDD_MM;
+ ? ? ? do_scale_vcore(SMPS_REG_ADDR_45_IVA, volt);

Quoted 5 lines

- ? ? ? /* VCORE 2 - for vdd_MM */
- ? ? ? volt = 1125;
- ? ? ? do_scale_vcore(SMPS_REG_ADDR_VCORE2, volt);
+ ? ? ? volt = VDD_CORE;
+ ? ? ? do_scale_vcore(SMPS_REG_ADDR_8_CORE, volt);

Quoted 4 lines

I think what might be easiest all around is to drop Nishanth's 4/4 and have patch 5 here correct the order as well, crediting Nishanth for the fix. Alternatively, respin the series, depending on Nishanth's series being applied. Thanks.

I can quickly do your first suggestion.
This can reduce the number of patches and make them ordered as well.

Quoted 3 lines

--
Tom

#11 lore raw

PATCH v2 6/18 OMAP5: hwinit: Add the missing break statement

In reply to R Sricharan

The break statement is missing in init_omap_revision function, resulting in a wrong revision identification. So fixing this.

---
 arch/arm/cpu/armv7/omap5/hwinit.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/omap5/hwinit.c +1 -0
index d024ab5..68cf558 100644
@@ -155,6 +155,7 @@ void init_omap_revision(void)
 	switch (rev) {
 	case MIDR_CORTEX_A15_R0P0:
 		*omap5_revision = OMAP5430_ES1_0;
+		break;
 	default:
 		*omap5_revision = OMAP5430_SILICON_ID_INVALID;
 	}
Signature · 1 line
1.7.1
#12 lore raw

PATCH v2 7/18 OMAP4/5: Make the silicon revision variable common.

In reply to R Sricharan

The different silicon revision variable names was defined for OMAP4 and OMAP5 socs. Making the variable common so that some code can be made generic.

---
 arch/arm/cpu/armv7/omap4/hwinit.c           |   20 ++++++++++----------
 arch/arm/cpu/armv7/omap5/hwinit.c           |    6 +++---
 arch/arm/include/asm/arch-omap4/sys_proto.h |    6 ------
 arch/arm/include/asm/arch-omap5/sys_proto.h |    6 ------
 arch/arm/include/asm/omap_common.h          |    6 ++++++
 5 files changed, 19 insertions(+), 25 deletions(-)
arch/arm/cpu/armv7/omap4/hwinit.c +10 -10
index 91f8320..afa5484 100644
@@ -37,7 +37,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-u32 *const omap4_revision = (u32 *)OMAP4_SRAM_SCRATCH_OMAP4_REV;
+u32 *const omap_si_rev = (u32 *)OMAP4_SRAM_SCRATCH_OMAP4_REV;
 
 static const struct gpio_bank gpio_bank_44xx[6] = {
 	{ (void *)OMAP44XX_GPIO1_BASE, METHOD_GPIO_24XX },
@@ -129,40 +129,40 @@ void init_omap_revision(void)
 
 	switch (arm_rev) {
 	case MIDR_CORTEX_A9_R0P1:
-		*omap4_revision = OMAP4430_ES1_0;
+		*omap_si_rev = OMAP4430_ES1_0;
 		break;
 	case MIDR_CORTEX_A9_R1P2:
 		switch (readl(CONTROL_ID_CODE)) {
 		case OMAP4_CONTROL_ID_CODE_ES2_0:
-			*omap4_revision = OMAP4430_ES2_0;
+			*omap_si_rev = OMAP4430_ES2_0;
 			break;
 		case OMAP4_CONTROL_ID_CODE_ES2_1:
-			*omap4_revision = OMAP4430_ES2_1;
+			*omap_si_rev = OMAP4430_ES2_1;
 			break;
 		case OMAP4_CONTROL_ID_CODE_ES2_2:
-			*omap4_revision = OMAP4430_ES2_2;
+			*omap_si_rev = OMAP4430_ES2_2;
 			break;
 		default:
-			*omap4_revision = OMAP4430_ES2_0;
+			*omap_si_rev = OMAP4430_ES2_0;
 			break;
 		}
 		break;
 	case MIDR_CORTEX_A9_R1P3:
-		*omap4_revision = OMAP4430_ES2_3;
+		*omap_si_rev = OMAP4430_ES2_3;
 		break;
 	case MIDR_CORTEX_A9_R2P10:
 		switch (readl(CONTROL_ID_CODE)) {
 		case OMAP4460_CONTROL_ID_CODE_ES1_1:
-			*omap4_revision = OMAP4460_ES1_1;
+			*omap_si_rev = OMAP4460_ES1_1;
 			break;
 		case OMAP4460_CONTROL_ID_CODE_ES1_0:
 		default:
-			*omap4_revision = OMAP4460_ES1_0;
+			*omap_si_rev = OMAP4460_ES1_0;
 			break;
 		}
 		break;
 	default:
-		*omap4_revision = OMAP4430_SILICON_ID_INVALID;
+		*omap_si_rev = OMAP4430_SILICON_ID_INVALID;
 		break;
 	}
 }
arch/arm/cpu/armv7/omap5/hwinit.c +3 -3
index 68cf558..84b3830 100644
@@ -38,7 +38,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-u32 *const omap5_revision = (u32 *)OMAP5_SRAM_SCRATCH_OMAP5_REV;
+u32 *const omap_si_rev = (u32 *)OMAP5_SRAM_SCRATCH_OMAP5_REV;
 
 static struct gpio_bank gpio_bank_54xx[6] = {
 	{ (void *)OMAP54XX_GPIO1_BASE, METHOD_GPIO_24XX },
@@ -154,9 +154,9 @@ void init_omap_revision(void)
 
 	switch (rev) {
 	case MIDR_CORTEX_A15_R0P0:
-		*omap5_revision = OMAP5430_ES1_0;
+		*omap_si_rev = OMAP5430_ES1_0;
 		break;
 	default:
-		*omap5_revision = OMAP5430_SILICON_ID_INVALID;
+		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
 	}
 }
arch/arm/include/asm/arch-omap4/sys_proto.h +0 -6
index b8dbc2c..4037172 100644
@@ -112,10 +112,4 @@ static inline u32 omap_hw_init_context(void)
 #endif
 }
 
-static inline u32 omap_revision(void)
-{
-	extern u32 *const omap4_revision;
-	return *omap4_revision;
-}
-
 #endif
arch/arm/include/asm/arch-omap5/sys_proto.h +0 -6
index 40a7c57..0d344d6 100644
@@ -113,10 +113,4 @@ static inline u32 omap_hw_init_context(void)
 #endif
 }
 
-static inline u32 omap_revision(void)
-{
-	extern u32 *const omap5_revision;
-	return *omap5_revision;
-}
-
 #endif
arch/arm/include/asm/omap_common.h +6 -0
index 34bec45..03b7ff1 100644
@@ -103,6 +103,12 @@ void spl_mmc_load_image(void);
 void spl_board_init(void);
 #endif
 
+static inline u32 omap_revision(void)
+{
+	extern u32 *const omap_si_rev;
+	return *omap_si_rev;
+}
+
 /*
  * silicon revisions.
  * Moving this to common, so that most of code can be moved to common,
Signature · 1 line
1.7.1
#13 lore raw

PATCH v2 8/18 OMAP5: SRAM: Change the SRAM base address.

In reply to R Sricharan

The full internal SRAM of size 128kb is public in the case of OMAP5 soc. So change the base address accordingly.

---
 arch/arm/include/asm/arch-omap5/omap.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/include/asm/arch-omap5/omap.h +1 -1
index 07546c9..10a973c 100644
@@ -249,7 +249,7 @@ struct omap5_sys_ctrl_regs {
  * Non-secure RAM starts at 0x40300000 for GP devices. But we keep SRAM_BASE
  * at 0x40304000(EMU base) so that our code works for both EMU and GP
  */
-#define NON_SECURE_SRAM_START	0x40304000
+#define NON_SECURE_SRAM_START	0x40300000
 #define NON_SECURE_SRAM_END	0x40320000	/* Not inclusive */
 /* base address for indirect vectors (internal boot mode) */
 #define SRAM_ROM_VECT_BASE	0x4031F000
Signature · 1 line
1.7.1
#14 lore raw

PATCH v2 9/18 OMAP4/5: Make the sysctrl structure common

In reply to R Sricharan

Make the sysctrl structure common, so that it can be used in generic functions across socs.
Also change the base address of the system control module, to include all the registers and not simply the io regs.

---
 arch/arm/cpu/armv7/omap4/hwinit.c      |    4 ++--
 arch/arm/cpu/armv7/omap5/hwinit.c      |    4 ++--
 arch/arm/include/asm/arch-omap4/omap.h |   10 ++++++----
 arch/arm/include/asm/arch-omap5/omap.h |   13 +++++++------
 drivers/mmc/omap_hsmmc.c               |    4 ++--
 5 files changed, 19 insertions(+), 16 deletions(-)
arch/arm/cpu/armv7/omap4/hwinit.c +2 -2
index afa5484..187e938 100644
@@ -59,8 +59,8 @@ void do_io_settings(void)
 	u32 lpddr2io;
 	struct control_lpddr2io_regs *lpddr2io_regs =
 		(struct control_lpddr2io_regs *)LPDDR2_IO_REGS_BASE;
-	struct omap4_sys_ctrl_regs *const ctrl =
-		(struct omap4_sys_ctrl_regs *)SYSCTRL_GENERAL_CORE_BASE;
+	struct omap_sys_ctrl_regs *const ctrl =
+		(struct omap_sys_ctrl_regs *)SYSCTRL_GENERAL_CORE_BASE;
 
 	u32 omap4_rev = omap_revision();
 
arch/arm/cpu/armv7/omap5/hwinit.c +2 -2
index 84b3830..7da7075 100644
@@ -58,8 +58,8 @@ const struct gpio_bank *const omap_gpio_bank = gpio_bank_54xx;
 void do_io_settings(void)
 {
 	u32 io_settings = 0, mask = 0;
-	struct omap5_sys_ctrl_regs *ioregs_base =
-			(struct omap5_sys_ctrl_regs *) OMAP5_IOREGS_BASE;
+	struct omap_sys_ctrl_regs *ioregs_base =
+		      (struct omap_sys_ctrl_regs *) SYSCTRL_GENERAL_CORE_BASE;
 
 	/* Impedance settings EMMC, C2C 1,2, hsi2 */
 	mask = (ds_mask << 2) | (ds_mask << 8) |
arch/arm/include/asm/arch-omap4/omap.h +6 -4
index 416c6de..5fd692f 100644
@@ -139,18 +139,20 @@ struct s32ktimer {
 	unsigned int s32k_cr;	/* 0x10 */
 };
 
-struct omap4_sys_ctrl_regs {
+struct omap_sys_ctrl_regs {
 	unsigned int pad1[129];
 	unsigned int control_id_code;			/* 0x4A002204 */
 	unsigned int pad11[22];
 	unsigned int control_std_fuse_opp_bgap;		/* 0x4a002260 */
-	unsigned int pad2[47];
+	unsigned int pad2[24];				/* 0x4a002264 */
+	unsigned int control_status;			/* 0x4a0022c4 */
+	unsigned int pad3[22];				/* 0x4a0022c8 */
 	unsigned int control_ldosram_iva_voltage_ctrl;	/* 0x4A002320 */
 	unsigned int control_ldosram_mpu_voltage_ctrl;	/* 0x4A002324 */
 	unsigned int control_ldosram_core_voltage_ctrl;	/* 0x4A002328 */
-	unsigned int pad3[260277];
+	unsigned int pad4[260277];
 	unsigned int control_pbiaslite;                 /* 0x4A100600 */
-	unsigned int pad4[63];
+	unsigned int pad5[63];
 	unsigned int control_efuse_1;			/* 0x4A100700 */
 	unsigned int control_efuse_2;			/* 0x4A100704 */
 };
arch/arm/include/asm/arch-omap5/omap.h +7 -6
index 10a973c..7e17c76 100644
@@ -136,9 +136,10 @@ struct s32ktimer {
 	unsigned int s32k_cr;	/* 0x10 */
 };
 
-#define OMAP5_IOREGS_BASE	0x4A002DA0
-
-struct omap5_sys_ctrl_regs {
+struct omap_sys_ctrl_regs {
+	u32 pad0[77]; /* 0x4A002000 */
+	u32 control_status; /* 0x4A002134 */
+	u32 pad1[794]; /* 0x4A002138 */
 	u32 control_paconf_global; /* 0x4A002DA0 */
 	u32 control_paconf_mode;  /* 0x4A002DA4 */
 	u32 control_smart1io_padconf_0; /* 0x4A002DA8 */
@@ -149,7 +150,7 @@ struct omap5_sys_ctrl_regs {
 	u32 control_smart2io_padconf_2; /* 0x4A002DBC */
 	u32 control_smart3io_padconf_0; /* 0x4A002DC0 */
 	u32 control_smart3io_padconf_1; /* 0x4A002DC4 */
-	u32 pad1[14];
+	u32 pad2[14];
 	u32 control_pbias; /* 0x4A002E00 */
 	u32 control_i2c_0; /* 0x4A002E04 */
 	u32 control_camera_rx; /* 0x4A002E08 */
@@ -160,7 +161,7 @@ struct omap5_sys_ctrl_regs {
 	u32 control_usb2phycore; /* 0x4A002E1C */
 	u32 control_hdmi_1; /*0x4A002E20*/
 	u32 control_hsi; /*0x4A002E24*/
-	u32 pad2[2];
+	u32 pad3[2];
 	u32 control_ddr3ch1_0; /*0x4A002E30*/
 	u32 control_ddr3ch2_0; /*0x4A002E34*/
 	u32 control_ddrch1_0;	/*0x4A002E38*/
@@ -183,7 +184,7 @@ struct omap5_sys_ctrl_regs {
 	u32 control_srcomp_east_side; /*0x4A002E7C*/
 	u32 control_srcomp_west_side; /*0x4A002E80*/
 	u32 control_srcomp_code_latch; /*0x4A002E84*/
-	u32 pad3[3680198];
+	u32 pad4[3680198];
 	u32 control_smart1nopmio_padconf_0; /* 0x4AE0CDA0 */
 	u32 control_smart1nopmio_padconf_1; /* 0x4AE0CDA4 */
 	u32 control_padconf_mode; /* 0x4AE0CDA8 */
drivers/mmc/omap_hsmmc.c +2 -2
index 2400db2..50a9391 100644
@@ -45,8 +45,8 @@ static struct mmc hsmmc_dev[2];
 static void omap4_vmmc_pbias_config(struct mmc *mmc)
 {
 	u32 value = 0;
-	struct omap4_sys_ctrl_regs *const ctrl =
-		(struct omap4_sys_ctrl_regs *)SYSCTRL_GENERAL_CORE_BASE;
+	struct omap_sys_ctrl_regs *const ctrl =
+		(struct omap_sys_ctrl_regs *) SYSCTRL_GENERAL_CORE_BASE;
 
 
 	value = readl(&ctrl->control_pbiaslite);
Signature · 1 line
1.7.1
#15 lore raw

PATCH v2 10/18 OMAP4/5: device: Add support to get the device type.

In reply to R Sricharan

Add support to identify the device as GP/EMU/HS.

---
 arch/arm/cpu/armv7/omap-common/hwinit-common.c |    6 +++++-
 arch/arm/include/asm/arch-omap4/omap.h         |    4 ++++
 arch/arm/include/asm/arch-omap5/omap.h         |    4 ++++
 3 files changed, 13 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap-common/hwinit-common.c +5 -1
index ab46bff..10e7669 100644
@@ -217,7 +217,11 @@ int arch_cpu_init(void)
  */
 u32 get_device_type(void)
 {
-	return 0;
+	struct omap_sys_ctrl_regs *ctrl =
+		      (struct omap_sys_ctrl_regs *) SYSCTRL_GENERAL_CORE_BASE;
+
+	return (readl(&ctrl->control_status) &
+				      (DEVICE_TYPE_MASK)) >> DEVICE_TYPE_SHIFT;
 }
 
 /*
arch/arm/include/asm/arch-omap4/omap.h +4 -0
index 5fd692f..3a39787 100644
@@ -139,6 +139,10 @@ struct s32ktimer {
 	unsigned int s32k_cr;	/* 0x10 */
 };
 
+#define DEVICE_TYPE_SHIFT (0x8)
+#define DEVICE_TYPE_MASK (0x7 << DEVICE_TYPE_SHIFT)
+#define DEVICE_GP 0x3
+
 struct omap_sys_ctrl_regs {
 	unsigned int pad1[129];
 	unsigned int control_id_code;			/* 0x4A002204 */
arch/arm/include/asm/arch-omap5/omap.h +4 -0
index 7e17c76..2725392 100644
@@ -136,6 +136,10 @@ struct s32ktimer {
 	unsigned int s32k_cr;	/* 0x10 */
 };
 
+#define DEVICE_TYPE_SHIFT 0x6
+#define DEVICE_TYPE_MASK (0x7 << DEVICE_TYPE_SHIFT)
+#define DEVICE_GP 0x3
+
 struct omap_sys_ctrl_regs {
 	u32 pad0[77]; /* 0x4A002000 */
 	u32 control_status; /* 0x4A002134 */
Signature · 1 line
1.7.1
#16 lore raw

PATCH v2 11/18 OMAP5: defconfig: Align the defconfig for 5430 ES1.0

In reply to R Sricharan

Adding the nessecary changes for OMAP5430 ES1.0 silicon.

---
 include/configs/omap5_evm.h |   21 ++++++---------------
 1 files changed, 6 insertions(+), 15 deletions(-)
include/configs/omap5_evm.h +6 -15
index d3d5263..0bdfd69 100644
@@ -49,8 +49,10 @@
 #define CONFIG_DISPLAY_BOARDINFO
 
 /* Clock Defines */
-#define V_OSCK	38400000 /* Clock output from T2 */
+#define V_OSCK			19200000	/* Clock output from T2 */
 #define V_SCLK	V_OSCK
+#define CONFIG_SYS_CLOCKS_ENABLE_ALL	1	/* Enable all clocks */
+#define CONFIG_SYS_ENABLE_PADS_ALL	1	/* Enable all PADS for now */
 
 #undef CONFIG_USE_IRQ	/* no support for IRQs */
 #define CONFIG_MISC_INIT_R
@@ -97,10 +99,6 @@
 #define CONFIG_DRIVER_OMAP34XX_I2C
 #define CONFIG_I2C_MULTI_BUS
 
-/* TWL6030 */
-#define CONFIG_TWL6030_POWER
-#define CONFIG_CMD_BAT
-
 /* MMC */
 #define CONFIG_GENERIC_MMC
 #define CONFIG_MMC
@@ -112,13 +110,6 @@
 #define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2: eMMC(1) */
 #define CONFIG_ENV_OFFSET		0xE0000
 
-/* USB */
-#define CONFIG_MUSB_UDC
-#define CONFIG_USB_OMAP3
-
-/* USB device configuration */
-#define CONFIG_USB_DEVICE
-#define CONFIG_USB_TTY
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 
 /* Flash */
@@ -154,7 +145,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
-	"console=ttyS2,115200n8\0" \
+	"console=ttyO2,115200n8\0" \
 	"usbtty=cdc_acm\0" \
 	"vram=16M\0" \
 	"mmcdev=0\0" \
@@ -250,8 +241,8 @@
 
 /* Defines for SPL */
 #define CONFIG_SPL
-#define CONFIG_SPL_TEXT_BASE		0x40304350
-#define CONFIG_SPL_MAX_SIZE		0x1E000	/* 120K */
+#define CONFIG_SPL_TEXT_BASE		0x40300350
+#define CONFIG_SPL_MAX_SIZE		0x19000	/* 100K */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
Signature · 1 line
1.7.1
#17 lore raw

PATCH v2 12/18 OMAP5: ddr: Change the ddr device name.

In reply to R Sricharan

The ddr part name used in OMAP5 ES1.0 soc is a SAMSUNG part and not a ELPIDA part. So change this.

---
 arch/arm/cpu/armv7/omap5/Makefile                  |    2 +-
 .../cpu/armv7/omap5/{sdram_elpida.c => sdram.c}    |   30 ++++++++++----------
 2 files changed, 16 insertions(+), 16 deletions(-)
 rename arch/arm/cpu/armv7/omap5/{sdram_elpida.c => sdram.c} (87%)
arch/arm/cpu/armv7/omap5/Makefile +1 -1
index f8ca9ac..9b261c4 100644
@@ -28,7 +28,7 @@ LIB	=  $(obj)lib$(SOC).o
 COBJS	+= hwinit.o
 COBJS	+= clocks.o
 COBJS	+= emif.o
-COBJS	+= sdram_elpida.o
+COBJS	+= sdram.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
arch/arm/cpu/armv7/omap5/sdram.c renamed from arch/arm/cpu/armv7/omap5/sdram_elpida.c +15 -15
similarity index 87%
rename from arch/arm/cpu/armv7/omap5/sdram_elpida.c
rename to arch/arm/cpu/armv7/omap5/sdram.c
index 85805b8..b2b5753 100644
@@ -1,5 +1,5 @@
 /*
- * Timing and Organization details of the Elpida parts used in OMAP5
+ * Timing and Organization details of the ddr device parts used in OMAP5
  * EVM
  *
  * (C) Copyright 2010
@@ -48,7 +48,7 @@
  */
 
 #ifdef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
-const struct emif_regs emif_regs_elpida_532_mhz_2cs = {
+const struct emif_regs emif_regs_532_mhz_2cs = {
 	.sdram_config_init		= 0x80800EBA,
 	.sdram_config			= 0x808022BA,
 	.ref_ctrl			= 0x0000081A,
@@ -67,7 +67,7 @@ const struct emif_regs emif_regs_elpida_532_mhz_2cs = {
 	.emif_ddr_ext_phy_ctrl_5	= 0x04010040
 };
 
-const struct emif_regs emif_regs_elpida_266_mhz_2cs = {
+const struct emif_regs emif_regs_266_mhz_2cs = {
 	.sdram_config_init		= 0x80800EBA,
 	.sdram_config			= 0x808022BA,
 	.ref_ctrl			= 0x0000040D,
@@ -117,7 +117,7 @@ const u32 ext_phy_ctrl_const_base[EMIF_EXT_PHY_CTRL_CONST_REG] = {
 
 static void emif_get_reg_dump_sdp(u32 emif_nr, const struct emif_regs **regs)
 {
-	*regs = &emif_regs_elpida_532_mhz_2cs;
+	*regs = &emif_regs_532_mhz_2cs;
 }
 void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
 	__attribute__((weak, alias("emif_get_reg_dump_sdp")));
@@ -133,11 +133,11 @@ void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
 
 #else
 
-static const struct lpddr2_device_details elpida_4G_S4_details = {
+static const struct lpddr2_device_details dev_4G_S4_details = {
 	.type		= LPDDR2_TYPE_S4,
 	.density	= LPDDR2_DENSITY_4Gb,
 	.io_width	= LPDDR2_IO_WIDTH_32,
-	.manufacturer	= LPDDR2_MANUFACTURER_ELPIDA
+	.manufacturer	= LPDDR2_MANUFACTURER_SAMSUNG
 };
 
 static void emif_get_device_details_sdp(u32 emif_nr,
@@ -145,8 +145,8 @@ static void emif_get_device_details_sdp(u32 emif_nr,
 		struct lpddr2_device_details *cs1_device_details)
 {
 	/* EMIF1 & EMIF2 have identical configuration */
-	*cs0_device_details = elpida_4G_S4_details;
-	*cs1_device_details = elpida_4G_S4_details;
+	*cs0_device_details = dev_4G_S4_details;
+	*cs1_device_details = dev_4G_S4_details;
 }
 
 void emif_get_device_details(u32 emif_nr,
@@ -180,7 +180,7 @@ static const struct lpddr2_ac_timings timings_jedec_532_mhz = {
 	.tFAW		= 50
 };
 
-static const struct lpddr2_min_tck min_tck_elpida = {
+static const struct lpddr2_min_tck min_tck = {
 	.tRL		= 3,
 	.tRP_AB		= 3,
 	.tRCD		= 3,
@@ -195,13 +195,13 @@ static const struct lpddr2_min_tck min_tck_elpida = {
 	.tFAW		= 8
 };
 
-static const struct lpddr2_ac_timings *elpida_ac_timings[MAX_NUM_SPEEDBINS] = {
+static const struct lpddr2_ac_timings *ac_timings[MAX_NUM_SPEEDBINS] = {
 	&timings_jedec_532_mhz
 };
 
-static const struct lpddr2_device_timings elpida_4G_S4_timings = {
-	.ac_timings	= elpida_ac_timings,
-	.min_tck	= &min_tck_elpida,
+static const struct lpddr2_device_timings dev_4G_S4_timings = {
+	.ac_timings	= ac_timings,
+	.min_tck	= &min_tck,
 };
 
 void emif_get_device_timings_sdp(u32 emif_nr,
@@ -209,8 +209,8 @@ void emif_get_device_timings_sdp(u32 emif_nr,
 		const struct lpddr2_device_timings **cs1_device_timings)
 {
 	/* Identical devices on EMIF1 & EMIF2 */
-	*cs0_device_timings = &elpida_4G_S4_timings;
-	*cs1_device_timings = &elpida_4G_S4_timings;
+	*cs0_device_timings = &dev_4G_S4_timings;
+	*cs1_device_timings = &dev_4G_S4_timings;
 }
 
 void emif_get_device_timings(u32 emif_nr,
Signature · 1 line
1.7.1
#18 lore raw

PATCH v2 13/18 OMAP4/5: emif: Correct the emif power mgt shadow register bit fields.

In reply to R Sricharan

PD_TIM bit field which specifies the power down timing is defined to occupy bits 8-11, where as it is actually from 12-15 bits. So correcting this.

---
 arch/arm/include/asm/emif.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/emif.h +2 -2
index aab15d8..f1e3ad2 100644
@@ -226,8 +226,8 @@
 #define EMIF_REG_CS_TIM_MASK			(0xf << 0)
 
 /* PWR_MGMT_CTRL_SHDW */
-#define EMIF_REG_PD_TIM_SHDW_SHIFT			8
-#define EMIF_REG_PD_TIM_SHDW_MASK			(0xf << 8)
+#define EMIF_REG_PD_TIM_SHDW_SHIFT			12
+#define EMIF_REG_PD_TIM_SHDW_MASK			(0xf << 12)
 #define EMIF_REG_SR_TIM_SHDW_SHIFT			4
 #define EMIF_REG_SR_TIM_SHDW_MASK			(0xf << 4)
 #define EMIF_REG_CS_TIM_SHDW_SHIFT			0
Signature · 1 line
1.7.1
#19 lore raw

PATCH v2 14/18 arm: omap5: correct boot device mode7 for eMMC

In reply to R Sricharan

From: Balaji T K <[email protected]>

In OMAP5 Boot device mode of 6 and 7 should be mapped to mmc2/eMMC

---
 arch/arm/cpu/armv7/omap-common/spl.c     |    1 +
 arch/arm/cpu/armv7/omap-common/spl_mmc.c |    1 +
 arch/arm/include/asm/omap_common.h       |    5 ++++-
 3 files changed, 6 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap-common/spl.c +1 -0
index 9c1f7e3..b2f8420 100644
@@ -126,6 +126,7 @@ void board_init_r(gd_t *id, ulong dummy)
 #ifdef CONFIG_SPL_MMC_SUPPORT
 	case BOOT_DEVICE_MMC1:
 	case BOOT_DEVICE_MMC2:
+	case BOOT_DEVICE_MMC2_2:
 		spl_mmc_load_image();
 		break;
 #endif
arch/arm/cpu/armv7/omap-common/spl_mmc.c +1 -0
index 6f5b43e..4a06caf 100644
@@ -42,6 +42,7 @@ int board_mmc_init(bd_t *bis)
 		omap_mmc_init(0);
 		break;
 	case BOOT_DEVICE_MMC2:
+	case BOOT_DEVICE_MMC2_2:
 		omap_mmc_init(1);
 		break;
 	}
arch/arm/include/asm/omap_common.h +4 -1
index 03b7ff1..14a16ae 100644
@@ -45,7 +45,7 @@ void preloader_console_init(void);
 #define BOOT_DEVICE_ONE_NAND    4
 #define BOOT_DEVICE_MMC1        5
 #define BOOT_DEVICE_MMC2        6
-#define BOOT_DEVICE_MMC3	7
+#define BOOT_DEVICE_MMC2_2	7
 #elif defined(CONFIG_OMAP44XX) /* OMAP4 */
 #define BOOT_DEVICE_NONE	0
 #define BOOT_DEVICE_XIP		1
@@ -54,6 +54,7 @@ void preloader_console_init(void);
 #define BOOT_DEVICE_ONE_NAND	4
 #define BOOT_DEVICE_MMC1	5
 #define BOOT_DEVICE_MMC2	6
+#define BOOT_DEVICE_MMC2_2	0xFF
 #elif defined(CONFIG_OMAP34XX)	/* OMAP3 */
 #define BOOT_DEVICE_NONE	0
 #define BOOT_DEVICE_XIP		1
@@ -62,11 +63,13 @@ void preloader_console_init(void);
 #define BOOT_DEVICE_MMC2	5 /*emmc*/
 #define BOOT_DEVICE_MMC1	6
 #define BOOT_DEVICE_XIPWAIT	7
+#define BOOT_DEVICE_MMC2_2      0xFF
 #elif defined(CONFIG_AM33XX)	/* AM33XX */
 #define BOOT_DEVICE_NAND	5
 #define BOOT_DEVICE_MMC1	8
 #define BOOT_DEVICE_MMC2	0
 #define BOOT_DEVICE_UART	65
+#define BOOT_DEVICE_MMC2_2      0xFF
 #endif
 
 /* Boot type */
Signature · 1 line
1.7.1
#20 lore raw

PATCH v2 15/18 power: twl6035: add palmas PMIC support

In reply to R Sricharan

palmas/TWL6035 is power IC for omap5 evm boards

---
 board/ti/omap5_evm/evm.c    |    6 +++---
 drivers/power/Makefile      |    1 +
 drivers/power/twl6035.c     |   40 ++++++++++++++++++++++++++++++++++++++++
 include/configs/omap5_evm.h |    5 +++++
 include/twl6035.h           |   41 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 90 insertions(+), 3 deletions(-)
 create mode 100644 drivers/power/twl6035.c
 create mode 100644 include/twl6035.h
board/ti/omap5_evm/evm.c +3 -3
index ea0cb13..c1fe410 100644
@@ -23,7 +23,7 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
-#include <twl6030.h>
+#include <twl6035.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
 
@@ -63,8 +63,8 @@ int board_eth_init(bd_t *bis)
  */
 int misc_init_r(void)
 {
-#ifdef CONFIG_TWL6030_POWER
-	twl6030_init_battery_charging();
+#ifdef CONFIG_TWL6035_POWER
+	twl6035_init_settings();
 #endif
 	return 0;
 }
drivers/power/Makefile +1 -0
index ead00f8..f24b93c 100644
@@ -28,6 +28,7 @@ LIB 	:= $(obj)libpower.o
 COBJS-$(CONFIG_FTPMU010_POWER)	+= ftpmu010.o
 COBJS-$(CONFIG_TWL4030_POWER)	+= twl4030.o
 COBJS-$(CONFIG_TWL6030_POWER)	+= twl6030.o
+COBJS-$(CONFIG_TWL6035_POWER)	+= twl6035.o
 
 COBJS	:= $(COBJS-y)
 SRCS 	:= $(COBJS:.o=.c)
drivers/power/twl6035.c new file +40 -0
new file mode 100644
index 0000000..d75212c
@@ -0,0 +1,40 @@
+/*
+ * (C) Copyright 2012
+ * Texas Instruments, <www.ti.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include <config.h>
+#include <twl6035.h>
+
+/* Functions to read and write from TWL6030 */
+int twl6035_i2c_write_u8(u8 chip_no, u8 val, u8 reg)
+{
+	return i2c_write(chip_no, reg, 1, &val, 1);
+}
+
+int twl6035_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
+{
+	return i2c_read(chip_no, reg, 1, val, 1);
+}
+
+void twl6035_init_settings(void)
+{
+	return;
+}
include/configs/omap5_evm.h +5 -0
index 0bdfd69..2dc9811 100644
@@ -99,6 +99,11 @@
 #define CONFIG_DRIVER_OMAP34XX_I2C
 #define CONFIG_I2C_MULTI_BUS
 
+/* TWL6035 */
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_TWL6035_POWER
+#endif
+
 /* MMC */
 #define CONFIG_GENERIC_MMC
 #define CONFIG_MMC
include/twl6035.h new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
1.7.1
#21 lore raw

PATCH v2 16/18 omap5: pbias ldo9 turn on

In reply to R Sricharan

From: Balaji T K <[email protected]>

Add omap5 pbias configuration for mmc1/sd lines
and set voltage for sd data i/o lines

---
 arch/arm/include/asm/arch-omap5/omap.h |    7 +++--
 drivers/mmc/omap_hsmmc.c               |   33 ++++++++++++++++++++++++++++++++
 drivers/power/twl6035.c                |   25 ++++++++++++++++++++++++
 include/twl6035.h                      |    1 +
 4 files changed, 63 insertions(+), 3 deletions(-)
arch/arm/include/asm/arch-omap5/omap.h +4 -3
index 2725392..d672b6f 100644
@@ -125,9 +125,10 @@
 /* CONTROL_EFUSE_2 */
 #define CONTROL_EFUSE_2_NMOS_PMOS_PTV_CODE_1		0x00ffc000
 
-#define MMC1_PWRDNZ					(1 << 26)
-#define MMC1_PBIASLITE_PWRDNZ				(1 << 22)
-#define MMC1_PBIASLITE_VMODE				(1 << 21)
+#define SDCARD_PWRDNZ					(1 << 26)
+#define SDCARD_BIAS_HIZ_MODE				(1 << 25)
+#define SDCARD_BIAS_PWRDNZ				(1 << 22)
+#define SDCARD_PBIASLITE_VMODE				(1 << 21)
 
 #ifndef __ASSEMBLY__
 
drivers/mmc/omap_hsmmc.c +33 -0
index 50a9391..a2e4046 100644
@@ -29,6 +29,7 @@
 #include <i2c.h>
 #include <twl4030.h>
 #include <twl6030.h>
+#include <twl6035.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
@@ -60,6 +61,34 @@ static void omap4_vmmc_pbias_config(struct mmc *mmc)
 }
 #endif
 
+#if defined(CONFIG_OMAP54XX) && defined(CONFIG_TWL6035_POWER)
+static void omap5_pbias_config(struct mmc *mmc)
+{
+	u32 value = 0;
+	struct omap_sys_ctrl_regs *const ctrl =
+		(struct omap_sys_ctrl_regs *) SYSCTRL_GENERAL_CORE_BASE;
+
+	value = readl(&ctrl->control_pbias);
+	value &= ~(SDCARD_PWRDNZ | SDCARD_BIAS_PWRDNZ);
+	value |= SDCARD_BIAS_HIZ_MODE;
+	writel(value, &ctrl->control_pbias);
+
+	twl6035_mmc1_poweron_ldo();
+
+	value = readl(&ctrl->control_pbias);
+	value &= ~SDCARD_BIAS_HIZ_MODE;
+	value |= SDCARD_PBIASLITE_VMODE | SDCARD_PWRDNZ | SDCARD_BIAS_PWRDNZ;
+	writel(value, &ctrl->control_pbias);
+
+	value = readl(&ctrl->control_pbias);
+	if (value & (1 << 23)) {
+		value &= ~(SDCARD_PWRDNZ | SDCARD_BIAS_PWRDNZ);
+		value |= SDCARD_BIAS_HIZ_MODE;
+		writel(value, &ctrl->control_pbias);
+	}
+}
+#endif
+
 unsigned char mmc_board_init(struct mmc *mmc)
 {
 #if defined(CONFIG_TWL4030_POWER)
@@ -94,6 +123,10 @@ unsigned char mmc_board_init(struct mmc *mmc)
 	if (mmc->block_dev.dev == 0)
 		omap4_vmmc_pbias_config(mmc);
 #endif
+#if defined(CONFIG_OMAP54XX) && defined(CONFIG_TWL6035_POWER)
+	if (mmc->block_dev.dev == 0)
+		omap5_pbias_config(mmc);
+#endif
 
 	return 0;
 }
drivers/power/twl6035.c +25 -0
index d75212c..624c09e 100644
@@ -34,7 +34,32 @@ int twl6035_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
 	return i2c_read(chip_no, reg, 1, val, 1);
 }
 
+/* To align with i2c mw/mr address, reg, val command syntax */
+static inline int palmas_write_u8(u8 chip_no, u8 reg, u8 val)
+{
+	return i2c_write(chip_no, reg, 1, &val, 1);
+}
+
+static inline int palmas_read_u8(u8 chip_no, u8 reg, u8 *val)
+{
+	return i2c_read(chip_no, reg, 1, val, 1);
+}
+
 void twl6035_init_settings(void)
 {
 	return;
 }
+
+void twl6035_mmc1_poweron_ldo(void)
+{
+	u8 val = 0;
+
+	/* set LDO9 TWL6035 to 3V */
+	val = 0x2b; /* (3 -.9)*28 +1 */
+	palmas_write_u8(0x48, LDO9_VOLTAGE, val);
+
+	/* TURN ON LDO9 */
+	val = LDO_ON | LDO_MODE_SLEEP | LDO_MODE_ACTIVE;
+	palmas_write_u8(0x48, LDO9_CTRL, val);
+	return;
+}
include/twl6035.h +1 -0
index 1e13317..e21ddba 100644
@@ -39,3 +39,4 @@
 int twl6035_i2c_write_u8(u8 chip_no, u8 val, u8 reg);
 int twl6035_i2c_read_u8(u8 chip_no, u8 *val, u8 reg);
 void twl6035_init_settings(void);
+void twl6035_mmc1_poweron_ldo(void);
Signature · 1 line
1.7.1
#22 lore raw

PATCH v2 17/18 mmc: omap5evm: Add eMMC saveenv support

In reply to R Sricharan

From: Balaji T K <[email protected]>

Save env to eMMC

---
 include/configs/omap5_evm.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/omap5_evm.h +1 -0
index 2dc9811..6c91ee8 100644
@@ -114,6 +114,7 @@
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2: eMMC(1) */
 #define CONFIG_ENV_OFFSET		0xE0000
+#define CONFIG_CMD_SAVEENV
 
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 
Signature · 1 line
1.7.1
#23 lore raw

PATCH v2 18/18 OMAP5: reset: Use cold reset in case of 5430ES1.0

In reply to R Sricharan

Warm reset is not functional in case of omap5430ES1.0. So use cold reset instead.

---
 arch/arm/cpu/armv7/omap-common/reset.S |    2 ++
 arch/arm/cpu/armv7/omap5/hwinit.c      |   16 ++++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/omap-common/reset.S +2 -0
index 838b122..3dce2a5 100644
@@ -23,6 +23,7 @@
 
 #include <config.h>
 
+#ifndef CONFIG_OMAP54XX
 .global reset_cpu
 reset_cpu:
 	ldr	r1, rstctl			@ get addr for global reset
@@ -36,3 +37,4 @@ rstctl:
 	.word	PRM_RSTCTRL
 rstbit:
 	.word	PRM_RSTCTRL_RESET
+#endif
arch/arm/cpu/armv7/omap5/hwinit.c +16 -0
index 7da7075..a7c1996 100644
@@ -160,3 +160,19 @@ void init_omap_revision(void)
 		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
 	}
 }
+
+static void reset_cpu_omap5(ulong addr)
+{
+	u32 omap_rev = omap_revision();
+
+	/*
+	 * WARM reset is not functional in case of OMAP5430 ES1.0 soc.
+	 * So use cold reset in case instead.
+	 */
+	if (omap_rev == OMAP5430_ES1_0)
+		writel(PRM_RSTCTRL_RESET << 0x1, PRM_RSTCTRL);
+	else
+		writel(PRM_RSTCTRL_RESET, PRM_RSTCTRL);
+}
+void reset_cpu(ulong addr)
+	__attribute__((weak, alias("reset_cpu_omap5")));
Signature · 1 line
1.7.1
#24 lore raw

PATCH v2 18/18 OMAP5: reset: Use cold reset in case of 5430ES1.0

Quoted 2 lines · R Sricharan

Warm reset is not functional in case of omap5430ES1.0. So use cold reset instead.

[snip]

arch/arm/cpu/armv7/omap-common/reset.S line 27

Quoted 8 lines
arch/arm/cpu/armv7/omap-common/reset.S +1 -0
@@ -23,6 +23,7 @@
 
 #include <config.h>
 
+#ifndef CONFIG_OMAP54XX
 .global reset_cpu

As Aneesh shows in the THUMB2 support thread, there's directives to make ASM+weak work. Please use them.

arch/arm/cpu/armv7/omap-common/reset.S line 28

Quoted 1 line
arch/arm/cpu/armv7/omap-common/reset.S +1 -0
+static void reset_cpu_omap5(ulong addr)

Add <linux/compiler.h> and just call this 'void __weak reset_cpu(ulong addr)'

Thanks!

Signature · 1 line
Tom
#25 lore raw

v2 cover OMAP5: Add the Changes required for OMAP5 ES1.0 silicon

In reply to R Sricharan
Quoted 5 lines · R Sricharan

OMAP5 soc support is already present in the mainline. The below are the changes that were identified during the actual silicon wakeup. Briefly, the changes address clocks, ddr, mux, poweric, mmc, io settings required/recommended for the ip. Couple of bug fixes are also added as a part of this series.

1 to 17 are fine and I'll apply them to u-boot-ti/next soon. With my comments to 18/18, please submit a v3 for just that patch. Thanks!

Signature · 1 line
Tom
#26 lore raw

v2 cover OMAP5: Add the Changes required for OMAP5 ES1.0 silicon

Tom,

Quoted 10 lines

-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Tom Rini
Sent: Monday, March 05, 2012 11:14 PM
To: R Sricharan
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V2 00/18] OMAP5: Add the Changes required for OMAP5 ES1.0 silicon

On Thu, Mar 01, 2012 at 08:08:25PM +0530, R Sricharan wrote:

Quoted 9 lines
Quoted 5 lines

OMAP5 soc support is already present in the mainline. The below are the changes that were identified during the actual silicon wakeup. Briefly, the changes address clocks, ddr, mux, poweric, mmc, io settings required/recommended for the ip. Couple of bug fixes are also added as a part of this series.

1 to 17 are fine and I'll apply them to u-boot-ti/next soon. With my comments to 18/18, please submit a v3 for just that patch. Thanks!

Thanks. I will send a V3 for patch 18 with your comments.

Thanks,
Sricharan

Quoted 2 lines

--
Tom