DRA7xx core support
Subsystems (7)
v3 cover DRA7xx core support
Changes in v3:
-1- Dropped some clock/dpll framework builds for dra7 -2- Added all instances of IPs in dtsi file
-3- dtsi does a 'disabled' by default and dts enables as needed -4- soc_is_dra7xx() based on DT compatible instead of using ID code
Changes in v2:
-1- Fixed minor changelog details
-2- Dropped the SRAM support patch since we need to move to drivers/misc/sram.c -3- Added DTS update patches to this series which were earlier posted as part of the data series (Since they don't have much objections as against the other in-kernel data files)
-4- Updated the EVM dts file with pin config details for uart/mcspi and i2c
DRA7xx based SoCs' are high-performance, infotainment application devices, based on enhanced OMAP architecture integrated on a 28nm technology.
The DRA7xx family is composed of DRA75x and DRA74x devices. The current device for which the patches add support is the DRA752 SoC.
Most of the core IPs are similar to those found on the OMAP5 devices, including the dual cortex-A15 based MPU subsystem, which has helped quite some reuse from existing OMAP5 support.
This series contains only core support patches and none of the PRCM and hwmod data needed for the device to boot.
The bootloader support for the platform is already available in mainline u-boot.
The patches posted in this series are available at:git://github.com/rrnayak/linux.git for-3.12/dra-core-v3
The patches (including the ones for in-kernel data) which boot on dra7xx evm are available at:
t://github.com/rrnayak/linux.git out-of-tree/dra-integrated-v3
R Sricharan (8):
ARM: DRA7: Reuse all of PRCM and MPUSS SMP infra
ARM: DRA7: Reuse io tables and add a new .init_early
ARM: DRA7: Resue the clocksource, clockevent support
ARM: DRA7: board-generic: Add basic DT support
ARM: DRA7: Kconfig: Make ARCH_NR_GPIO default to 512
ARM: DRA7: dts: Add the dts files for dra7 SoC and dra7-evm board
ARM: DRA7: id: Add cpu detection support for DRA7xx based SoCs'
ARM: DRA7: Add the build support in omap2plus
Rajendra Nayak (1):
ARM: DRA7: hwmod: Reuse the soc_ops used for OMAP4/5
.../devicetree/bindings/arm/omap/omap.txt | 3 + arch/arm/Kconfig | 2 +- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/dra7-evm.dts | 140 +++++ arch/arm/boot/dts/dra7.dtsi | 567 ++++++++++++++++++++ arch/arm/configs/omap2plus_defconfig | 1 + arch/arm/mach-omap1/include/mach/soc.h | 1 + arch/arm/mach-omap2/Kconfig | 12 +- arch/arm/mach-omap2/Makefile | 6 + arch/arm/mach-omap2/board-generic.c | 18 + arch/arm/mach-omap2/common.h | 1 + arch/arm/mach-omap2/id.c | 4 +- arch/arm/mach-omap2/io.c | 20 +- arch/arm/mach-omap2/omap54xx.h | 4 + arch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-omap2/soc.h | 17 + arch/arm/mach-omap2/timer.c | 3 +- arch/arm/plat-omap/Kconfig | 2 +- 18 files changed, 795 insertions(+), 11 deletions(-) create mode 100644 arch/arm/boot/dts/dra7-evm.dts create mode 100644 arch/arm/boot/dts/dra7.dtsi
Signature · 1 line
1.7.9.5
PATCH v3 1/9 ARM: DRA7: Reuse all of PRCM and MPUSS SMP infra
From: R Sricharan <[email protected]>
The PRCM and MPUSS parts of DRA7 devices are quite identical to OMAP5 so as to reuse all the existing infrastructure around it. Makefile updates to do just that.
--- arch/arm/mach-omap2/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-omap2/Makefile +6 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common) obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common) obj-$(CONFIG_SOC_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common) obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common) +obj-$(CONFIG_SOC_DRA7XX) += prm44xx.o $(hwmod-common) $(secure-common) ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) obj-y += mcbsp.o
@@ -39,6 +40,7 @@ omap-4-5-common = omap4-common.o omap-wakeupgen.o obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common) $(smp-y) sleep44xx.o obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common) $(smp-y) sleep44xx.o obj-$(CONFIG_SOC_AM43XX) += $(omap-4-5-common) +obj-$(CONFIG_SOC_DRA7XX) += $(omap-4-5-common) $(smp-y) plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
@@ -87,6 +89,7 @@ obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o +obj-$(CONFIG_SOC_DRA7XX) += omap-mpuss-lowpower.o obj-$(CONFIG_PM_DEBUG) += pm-debug.o obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o
@@ -114,6 +117,7 @@ omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \ vc44xx_data.o vp44xx_data.o obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common) obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common) +obj-$(CONFIG_SOC_DRA7XX) += $(omap-prcm-4-5-common) # OMAP voltage domains voltagedomain-common := voltage.o vc.o vp.o
@@ -143,6 +147,7 @@ obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o obj-$(CONFIG_SOC_AM43XX) += $(powerdomain-common) obj-$(CONFIG_SOC_OMAP5) += $(powerdomain-common) obj-$(CONFIG_SOC_OMAP5) += powerdomains54xx_data.o +obj-$(CONFIG_SOC_DRA7XX) += $(powerdomain-common) # PRCM clockdomain control clockdomain-common += clockdomain.o
@@ -160,6 +165,7 @@ obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o obj-$(CONFIG_SOC_AM43XX) += $(clockdomain-common) obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common) obj-$(CONFIG_SOC_OMAP5) += clockdomains54xx_data.o +obj-$(CONFIG_SOC_DRA7XX) += $(clockdomain-common) # Clock framework obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o
Signature · 1 line
1.7.9.5
PATCH v3 2/9 ARM: DRA7: Reuse io tables and add a new .init_early
In reply to Rajendra NayakFrom: R Sricharan <[email protected]>
The IO descriptor tables for DRA7 are a complete reuse from OMAP5. A new dra7xx_init_early() does the base address inits.
--- arch/arm/mach-omap2/common.h | 1 + arch/arm/mach-omap2/io.c | 20 ++++++++++++++++++-- arch/arm/mach-omap2/omap54xx.h | 4 ++++ 3 files changed, 23 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/common.h +1 -0
@@ -110,6 +110,7 @@ void omap3630_init_late(void);void am35xx_init_late (void );void ti81xx_init_late (void );int omap2_common_pm_late_init (void ); +void dra7xx_init_early (void );#ifdef CONFIG_SOC_BUS void omap_soc_device_init (void );
arch/arm/mach-omap2/io.c +18 -2
@@ -251,7 +251,7 @@ static struct map_desc omap44xx_io_desc[] __initdata = { };#endif -#ifdef CONFIG_SOC_OMAP5 +#if defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX) static struct map_desc omap54xx_io_desc[] __initdata = { { .virtual = L3_54XX_VIRT,
@@ -333,7 +333,7 @@ void __init omap4_map_io(void) }#endif -#ifdef CONFIG_SOC_OMAP5 +#if defined(CONFIG_SOC_OMAP5 ) || defined(CONFIG_SOC_DRA7XX )void __init omap5_map_io (void ) {iotable_init (omap54xx_io_desc,ARRAY_SIZE (omap54xx_io_desc));
@@ -653,6 +653,22 @@ void __init omap5_init_early(void) }#endif +#ifdef CONFIG_SOC_DRA7XX +void __init dra7xx_init_early (void ) +{ +omap2_set_globals_tap (-1 ,OMAP2_L4_IO_ADDRESS (DRA7XX_TAP_BASE )); +omap2_set_globals_control (OMAP2_L4_IO_ADDRESS (OMAP54XX_SCM_BASE ), +OMAP2_L4_IO_ADDRESS (DRA7XX_CTRL_BASE )); +omap2_set_globals_prm (OMAP2_L4_IO_ADDRESS (OMAP54XX_PRM_BASE )); +omap2_set_globals_cm (OMAP2_L4_IO_ADDRESS (DRA7XX_CM_CORE_AON_BASE ), +OMAP2_L4_IO_ADDRESS (OMAP54XX_CM_CORE_BASE )); +omap2_set_globals_prcm_mpu (OMAP2_L4_IO_ADDRESS (OMAP54XX_PRCM_MPU_BASE )); +omap_prm_base_init (); +omap_cm_base_init (); +} +#endif + +void __init omap_sdrc_init (struct omap_sdrc_params *sdrc_cs0,struct omap_sdrc_params *sdrc_cs1) {
arch/arm/mach-omap2/omap54xx.h +4 -0
@@ -30,4 +30,8 @@#define OMAP54XX_CTRL_BASE 0x4a002800#define OMAP54XX_SAR_RAM_BASE 0x4ae26000 +#define DRA7XX_CM_CORE_AON_BASE 0x4a005000 +#define DRA7XX_CTRL_BASE 0x4a003400 +#define DRA7XX_TAP_BASE 0x4ae0c000 +#endif /* __ASM_SOC_OMAP555554XX_H */
Signature · 1 line
1.7.9.5
PATCH v3 3/9 ARM: DRA7: Resue the clocksource, clockevent support
In reply to Rajendra NayakFrom: R Sricharan <[email protected]>
All of OMAP5 timer support for clocksource and clockevent is completely reused across DRA7.
--- arch/arm/mach-omap2/Kconfig | 2 +- arch/arm/mach-omap2/timer.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -1
@@ -132,7 +132,7 @@ config SOC_HAS_OMAP2_SDRC config SOC_HAS_REALTIME_COUNTER bool "Real time free running counter" - depends on SOC_OMAP5 + depends on SOC_OMAP5 || SOC_DRA7XX default y comment "OMAP Core Type"
arch/arm/mach-omap2/timer.c +2 -1
@@ -594,7 +594,8 @@ OMAP_SYS_GP_TIMER_INIT(3, 2, "timer_sys_ck", NULL, 1, "timer_sys_ck", "ti,timer-alwon");#endif -#if defined(CONFIG_ARCH_OMAP4 ) || defined(CONFIG_SOC_OMAP5 ) +#if defined(CONFIG_ARCH_OMAP4 ) || defined(CONFIG_SOC_OMAP5 ) || \ + defined(CONFIG_SOC_DRA7XX ) static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon", 2, "sys_clkin_ck", NULL);#endif
Signature · 1 line
1.7.9.5
PATCH v3 4/9 ARM: DRA7: board-generic: Add basic DT support
In reply to Rajendra NayakFrom: R Sricharan <[email protected]>
Describe minimal DT boot machine details for DRA7xx based SoC's. DRA7xx family is based on dual core ARM CORTEX A15 using GIC as the interrupt controller. The PRCM and timer infrastructure is reused from OMAP5 and so are the io descriptor tables.
--- .../devicetree/bindings/arm/omap/omap.txt | 3 +++ arch/arm/mach-omap2/board-generic.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+)
Documentation/devicetree/bindings/arm/omap/omap.txt +3 -0
@@ -59,3 +59,6 @@ Boards: - AM43x EPOS EVM compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43" + +- DRA7 EVM: Software Developement Board for DRA7XX + compatible = "ti,dra7-evm", "ti,dra7"
arch/arm/mach-omap2/board-generic.c +18 -0
@@ -222,3 +222,21 @@ DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)") .dt_compat = am43_boards_compat, MACHINE_END#endif + +#ifdef CONFIG_SOC_DRA7XX +static const char *dra7xx_boards_compat[]__initdata = { +"ti,dra7" , +NULL , +}; + +DT_MACHINE_START (DRA7XX_DT ,"Generic DRA7XX (Flattened Device Tree)" ) + .reserve = omap_reserve, + .smp = smp_ops(omap4_smp_ops), + .map_io = omap5_map_io, + .init_early = dra7xx_init_early, + .init_irq = omap_gic_of_init, + .init_machine = omap_generic_init, + .init_time = omap5_realtime_timer_init, + .dt_compat = dra7xx_boards_compat, +MACHINE_END +#endif
Signature · 1 line
1.7.9.5
PATCH v3 5/9 ARM: DRA7: Kconfig: Make ARCH_NR_GPIO default to 512
In reply to Rajendra NayakFrom: R Sricharan <[email protected]>
DRA7xx has 8 GPIO banks so that there are 32x8 = 256 GPIOs. In order for the gpiolib to detect and initialize these and other TWL GPIOs, ARCH_NR_GPIO is set to 512 using the kconfig default for DRA7.
--- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/Kconfig +1 -1
@@ -1600,7 +1600,7 @@ config LOCAL_TIMERS config ARCH_NR_GPIO int default 1024 if ARCH_SHMOBILE || ARCH_TEGRA - default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 + default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX default 392 if ARCH_U8500 default 352 if ARCH_VT8500 default 288 if ARCH_SUNXI
Signature · 1 line
1.7.9.5
PATCH v3 6/9 ARM: DRA7: dts: Add the dts files for dra7 SoC and dra7-evm board
In reply to Rajendra NayakFrom: R Sricharan <[email protected]>
Add minimal device tree source needed for DRA7 based SoCs. Also add a board dts file for the dra7-evm (based on dra752) which contains 1.5G of memory with 1G interleaved and 512MB non-interleaved. Also added in the board file are pin configuration details for i2c, mcspi and uart devices on board.
--- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/dra7-evm.dts | 140 ++++++++++ arch/arm/boot/dts/dra7.dtsi | 567 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 709 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/dra7-evm.dts create mode 100644 arch/arm/boot/dts/dra7.dtsi
arch/arm/boot/dts/Makefile +2 -1
@@ -173,7 +173,8 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ am335x-bone.dtb \ am3517-evm.dtb \ am3517_mt_ventoux.dtb \ - am43x-epos-evm.dtb + am43x-epos-evm.dtb \ + dra7-evm.dtb dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
arch/arm/boot/dts/dra7-evm.dts new file +140 -0
140 lines not on this page · raw message
arch/arm/boot/dts/dra7.dtsi new file +567 -0
567 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 7/9 ARM: DRA7: id: Add cpu detection support for DRA7xx based SoCs'
In reply to Rajendra NayakFrom: R Sricharan <[email protected]>
The DRA7xx is a high-performance, infotainment application device, based on enhanced OMAP architecture integrated on a 28-nm technology.
Since DRA7 is a platform supported only using DT, the cpu detection is based on the compatibles passed from DT blobs as suggested here
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/187712.html
--- arch/arm/mach-omap1/include/mach/soc.h | 1 + arch/arm/mach-omap2/id.c | 4 ++-- arch/arm/mach-omap2/soc.h | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-)
arch/arm/mach-omap1/include/mach/soc.h +1 -0
@@ -195,6 +195,7 @@ IS_OMAP_TYPE(1710, 0x1710)#define cpu_is_omap34xx () 0#define cpu_is_omap44xx () 0#define soc_is_omap54xx () 0 +#define soc_is_dra7xx () 0#define soc_is_am33xx () 0#define cpu_class_is_omap1 () 1#define cpu_class_is_omap2 () 0
arch/arm/mach-omap2/id.c +2 -2
@@ -61,7 +61,7 @@ int omap_type(void) val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); }else if (cpu_is_omap44xx ()) { val =omap_ctrl_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); - }else if (soc_is_omap54xx ()) { + }else if (soc_is_omap54xx () ||soc_is_dra7xx ()) { val =omap_ctrl_readl (OMAP5XXX_CONTROL_STATUS ); val &=OMAP5_DEVICETYPE_MASK ; val >>=6 ;
@@ -116,7 +116,7 @@ static u16 tap_prod_id;void omap_get_die_id (struct omap_die_id *odi) { -if (cpu_is_omap44xx () ||soc_is_omap54xx ()) { +if (cpu_is_omap44xx () ||soc_is_omap54xx () ||soc_is_dra7xx ()) { odi->id_0 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_0 ); odi->id_1 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_1 ); odi->id_2 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_2 );
arch/arm/mach-omap2/soc.h +17 -0
@@ -8,6 +8,7 @@* Written by Tony Lindgren <[email protected]> * * Added OMAP4/5 specific defines - Santosh Shilimkar<[email protected]> +* Added DRA7xxx specific defines - Sricharan R<[email protected]> * * 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
@@ -35,6 +36,7 @@#ifndef __ASSEMBLY__#include <linux/bitops.h> +#include <linux/of.h> /* * Test if multicore OMAP support is needed
@@ -105,6 +107,15 @@# endif #endif +#ifdef CONFIG_SOC_DRA7XX +# ifdef OMAP_NAME +# undef MULTI_OMAP2 +# define MULTI_OMAP2 +# else +# define OMAP_NAME DRA7XX +# endif +#endif +/* * Omap device type i.e. EMU/HS/TST/GP/BAD */
@@ -233,6 +244,7 @@ IS_AM_SUBCLASS(437x, 0x437)#define cpu_is_omap447x () 0#define soc_is_omap54xx () 0#define soc_is_omap543x () 0 +#define soc_is_dra7xx () 0#if defined(MULTI_OMAP2 )# if defined(CONFIG_ARCH_OMAP2 )
@@ -379,6 +391,11 @@ IS_OMAP_TYPE(3430, 0x3430)# define soc_is_omap543x () is_omap543x()#endif +#if defined(CONFIG_SOC_DRA7XX ) +#undef soc_is_dra7xx +#define soc_is_dra7xx () (of_machine_is_compatible("ti,dra7")) +#endif +/* Various silicon revisions for omap2 */ #define OMAP242X_CLASS 0x24200024#define OMAP2420_REV_ES1_0 OMAP242X_CLASS
Signature · 1 line
1.7.9.5
PATCH v3 7/9 ARM: DRA7: id: Add cpu detection support for DRA7xx based SoCs'
Quoted 98 lines · Rajendra Nayak
From: R Sricharan <[email protected]>
The DRA7xx is a high-performance, infotainment application device, based on enhanced OMAP architecture integrated on a 28-nm technology.
Since DRA7 is a platform supported only using DT, the cpu detection is based on the compatibles passed from DT blobs as suggested here
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/187712.htmlSuggested-by Felipe Balbi <[email protected]>Signed-off-by R Sricharan <[email protected]>Signed-off-by Rajendra Nayak <[email protected]>--- arch/arm/mach-omap1/include/mach/soc.h | 1 + arch/arm/mach-omap2/id.c | 4 ++-- arch/arm/mach-omap2/soc.h | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-)arch/arm/mach-omap1/include/mach/soc.h +1
-0@@ -195,6 +195,7 @@ IS_OMAP_TYPE(1710, 0x1710)#define cpu_is_omap34xx () 0#define cpu_is_omap44xx () 0#define soc_is_omap54xx () 0 +#define soc_is_dra7xx () 0#define soc_is_am33xx () 0#define cpu_class_is_omap1 () 1#define cpu_class_is_omap2 () 0arch/arm/mach-omap2/id.c +2
-2@@ -61,7 +61,7 @@ int omap_type(void) val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); }else if (cpu_is_omap44xx ()) { val =omap_ctrl_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); - }else if (soc_is_omap54xx ()) { + }else if (soc_is_omap54xx () ||soc_is_dra7xx ()) { val =omap_ctrl_readl (OMAP5XXX_CONTROL_STATUS ); val &=OMAP5_DEVICETYPE_MASK ; val >>=6 ;@@ -116,7 +116,7 @@ static u16 tap_prod_id;void omap_get_die_id (struct omap_die_id *odi) { -if (cpu_is_omap44xx () ||soc_is_omap54xx ()) { +if (cpu_is_omap44xx () ||soc_is_omap54xx () ||soc_is_dra7xx ()) { odi->id_0 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_0 ); odi->id_1 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_1 ); odi->id_2 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_2 );arch/arm/mach-omap2/soc.h +12
-0@@ -8,6 +8,7 @@* Written by Tony Lindgren <[email protected]> * * Added OMAP4/5 specific defines - Santosh Shilimkar<[email protected]> +* Added DRA7xxx specific defines - Sricharan R<[email protected]> * * 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 @@ -35,6 +36,7 @@#ifndef __ASSEMBLY__#include <linux/bitops.h> +#include <linux/of.h> /* * Test if multicore OMAP support is needed @@ -105,6 +107,15 @@# endif #endif +#ifdef CONFIG_SOC_DRA7XX +# ifdef OMAP_NAME +# undef MULTI_OMAP2 +# define MULTI_OMAP2 +# else +# define OMAP_NAME DRA7XX +# endif +#endif +/* * Omap device type i.e. EMU/HS/TST/GP/BAD */ @@ -233,6 +244,7 @@ IS_AM_SUBCLASS(437x, 0x437)#define cpu_is_omap447x () 0#define soc_is_omap54xx () 0#define soc_is_omap543x () 0 +#define soc_is_dra7xx () 0#if defined(MULTI_OMAP2 )# if defined(CONFIG_ARCH_OMAP2 )
arch/arm/mach-omap2/soc.h IS_OMAP_TYPE(3430, 0x3430) · line 396
Quoted 6 lines
arch/arm/mach-omap2/soc.h +3
-0@@ -379,6 +391,11 @@ IS_OMAP_TYPE(3430, 0x3430)# define soc_is_omap543x () is_omap543x()#endif +#if defined(CONFIG_SOC_DRA7XX ) +#undef soc_is_dra7xx +#define soc_is_dra7xx () (of_machine_is_compatible("ti,dra7"))
Wouldn't that be too expensive to call of_machine_is_compatible every time for DRA7 detection?
May be static variable can be used to store DRA7 presence status, smth. like this:
static inline int is_dra7xx(void)
{
static int is_dra7 = -1;
if (is_dra7 < 0)
is_dra7 = of_machine_is_compatible("ti,dra7");
return !!is_dra7;
}
(it's just an idea, not verified)
arch/arm/mach-omap2/soc.h IS_OMAP_TYPE(3430, 0x3430) · line 401
Quoted 6 lines
arch/arm/mach-omap2/soc.h +2
-0+#endif +/* Various silicon revisions for omap2 */ #define OMAP242X_CLASS 0x24200024#define OMAP2420_REV_ES1_0 OMAP242X_CLASS
Regards,
-grygorii
PATCH v3 7/9 ARM: DRA7: id: Add cpu detection support for DRA7xx based SoCs'
Hi Grygorii,
Quoted 102 lines · Grygorii Strashko
Quoted 101 lines · Rajendra Nayak
From: R Sricharan <[email protected]>
The DRA7xx is a high-performance, infotainment application device, based on enhanced OMAP architecture integrated on a 28-nm technology.
Since DRA7 is a platform supported only using DT, the cpu detection is based on the compatibles passed from DT blobs as suggested here
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/187712.htmlSuggested-by Felipe Balbi <[email protected]>Signed-off-by R Sricharan <[email protected]>Signed-off-by Rajendra Nayak <[email protected]>--- arch/arm/mach-omap1/include/mach/soc.h | 1 + arch/arm/mach-omap2/id.c | 4 ++-- arch/arm/mach-omap2/soc.h | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-)arch/arm/mach-omap1/include/mach/soc.h +1
-0@@ -195,6 +195,7 @@ IS_OMAP_TYPE(1710, 0x1710)#define cpu_is_omap34xx () 0#define cpu_is_omap44xx () 0#define soc_is_omap54xx () 0 +#define soc_is_dra7xx () 0#define soc_is_am33xx () 0#define cpu_class_is_omap1 () 1#define cpu_class_is_omap2 () 0arch/arm/mach-omap2/id.c +2
-2@@ -61,7 +61,7 @@ int omap_type(void) val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); }else if (cpu_is_omap44xx ()) { val =omap_ctrl_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); - }else if (soc_is_omap54xx ()) { + }else if (soc_is_omap54xx () ||soc_is_dra7xx ()) { val =omap_ctrl_readl (OMAP5XXX_CONTROL_STATUS ); val &=OMAP5_DEVICETYPE_MASK ; val >>=6 ;@@ -116,7 +116,7 @@ static u16 tap_prod_id;void omap_get_die_id (struct omap_die_id *odi) { -if (cpu_is_omap44xx () ||soc_is_omap54xx ()) { +if (cpu_is_omap44xx () ||soc_is_omap54xx () ||soc_is_dra7xx ()) { odi->id_0 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_0 ); odi->id_1 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_1 ); odi->id_2 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_2 );arch/arm/mach-omap2/soc.h +12
-0@@ -8,6 +8,7 @@* Written by Tony Lindgren <[email protected]> * * Added OMAP4/5 specific defines - Santosh Shilimkar<[email protected]> +* Added DRA7xxx specific defines - Sricharan R<[email protected]> * * 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 @@ -35,6 +36,7 @@#ifndef __ASSEMBLY__#include <linux/bitops.h> +#include <linux/of.h> /* * Test if multicore OMAP support is needed @@ -105,6 +107,15 @@# endif #endif +#ifdef CONFIG_SOC_DRA7XX +# ifdef OMAP_NAME +# undef MULTI_OMAP2 +# define MULTI_OMAP2 +# else +# define OMAP_NAME DRA7XX +# endif +#endif +/* * Omap device type i.e. EMU/HS/TST/GP/BAD */ @@ -233,6 +244,7 @@ IS_AM_SUBCLASS(437x, 0x437)#define cpu_is_omap447x () 0#define soc_is_omap54xx () 0#define soc_is_omap543x () 0 +#define soc_is_dra7xx () 0#if defined(MULTI_OMAP2 )# if defined(CONFIG_ARCH_OMAP2 )@@ -379,6 +391,11 @@ IS_OMAP_TYPE(3430, 0x3430)# define soc_is_omap543x () is_omap543x()#endif
Quoted 6 lines
arch/arm/mach-omap2/soc.h IS_OMAP_TYPE(3430, 0x3430) · line 396
Quoted 3 lines
arch/arm/mach-omap2/soc.h +3
-0+#if defined(CONFIG_SOC_DRA7XX ) +#undef soc_is_dra7xx +#define soc_is_dra7xx () (of_machine_is_compatible("ti,dra7"))Wouldn't that be too expensive to call
of_machine_is_compatibleevery time for DRA7 detection?
Ideally these soc checks should happen only once at init (see PATCH 8/9 in the series for instance) so there should not be a 'every time' penalty.
regards,
Rajendra
Quoted 26 lines
May be static variable can be used to store DRA7 presence status, smth. like this:
static inline int
is_dra7xx(void)
{
static intis_dra7= -1;if (
is_dra7< 0)
is_dra7=of_machine_is_compatible("ti,dra7");return !!is_dra7;
}(it's just an idea, not verified)
arch/arm/mach-omap2/soc.h IS_OMAP_TYPE(3430, 0x3430) · line 401
Quoted 6 lines
arch/arm/mach-omap2/soc.h +2
-0+#endif +/* Various silicon revisions for omap2 */ #define OMAP242X_CLASS 0x24200024#define OMAP2420_REV_ES1_0 OMAP242X_CLASSRegards,
-grygorii
PATCH v3 7/9 ARM: DRA7: id: Add cpu detection support for DRA7xx based SoCs'
Quoted 112 lines · Rajendra Nayak
Hi Grygorii,
Quoted 102 lines · Grygorii Strashko
Quoted 101 lines · Rajendra Nayak
From: R Sricharan <[email protected]>
The DRA7xx is a high-performance, infotainment application device, based on enhanced OMAP architecture integrated on a 28-nm technology.
Since DRA7 is a platform supported only using DT, the cpu detection is based on the compatibles passed from DT blobs as suggested here
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-July/187712.htmlSuggested-by Felipe Balbi <[email protected]>Signed-off-by R Sricharan <[email protected]>Signed-off-by Rajendra Nayak <[email protected]>--- arch/arm/mach-omap1/include/mach/soc.h | 1 + arch/arm/mach-omap2/id.c | 4 ++-- arch/arm/mach-omap2/soc.h | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-)arch/arm/mach-omap1/include/mach/soc.h +1
-0@@ -195,6 +195,7 @@ IS_OMAP_TYPE(1710, 0x1710)#define cpu_is_omap34xx () 0#define cpu_is_omap44xx () 0#define soc_is_omap54xx () 0 +#define soc_is_dra7xx () 0#define soc_is_am33xx () 0#define cpu_class_is_omap1 () 1#define cpu_class_is_omap2 () 0arch/arm/mach-omap2/id.c +2
-2@@ -61,7 +61,7 @@ int omap_type(void) val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); }else if (cpu_is_omap44xx ()) { val =omap_ctrl_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); - }else if (soc_is_omap54xx ()) { + }else if (soc_is_omap54xx () ||soc_is_dra7xx ()) { val =omap_ctrl_readl (OMAP5XXX_CONTROL_STATUS ); val &=OMAP5_DEVICETYPE_MASK ; val >>=6 ;@@ -116,7 +116,7 @@ static u16 tap_prod_id;void omap_get_die_id (struct omap_die_id *odi) { -if (cpu_is_omap44xx () ||soc_is_omap54xx ()) { +if (cpu_is_omap44xx () ||soc_is_omap54xx () ||soc_is_dra7xx ()) { odi->id_0 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_0 ); odi->id_1 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_1 ); odi->id_2 =read_tap_reg (OMAP_TAP_DIE_ID_44XX_2 );arch/arm/mach-omap2/soc.h +12
-0@@ -8,6 +8,7 @@* Written by Tony Lindgren <[email protected]> * * Added OMAP4/5 specific defines - Santosh Shilimkar<[email protected]> +* Added DRA7xxx specific defines - Sricharan R<[email protected]> * * 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 @@ -35,6 +36,7 @@#ifndef __ASSEMBLY__#include <linux/bitops.h> +#include <linux/of.h> /* * Test if multicore OMAP support is needed @@ -105,6 +107,15 @@# endif #endif +#ifdef CONFIG_SOC_DRA7XX +# ifdef OMAP_NAME +# undef MULTI_OMAP2 +# define MULTI_OMAP2 +# else +# define OMAP_NAME DRA7XX +# endif +#endif +/* * Omap device type i.e. EMU/HS/TST/GP/BAD */ @@ -233,6 +244,7 @@ IS_AM_SUBCLASS(437x, 0x437)#define cpu_is_omap447x () 0#define soc_is_omap54xx () 0#define soc_is_omap543x () 0 +#define soc_is_dra7xx () 0#if defined(MULTI_OMAP2 )# if defined(CONFIG_ARCH_OMAP2 )@@ -379,6 +391,11 @@ IS_OMAP_TYPE(3430, 0x3430)# define soc_is_omap543x () is_omap543x()#endif Quoted 6 lines
arch/arm/mach-omap2/soc.h IS_OMAP_TYPE(3430, 0x3430) · line 396
Quoted 3 lines
arch/arm/mach-omap2/soc.h +3
-0+#if defined(CONFIG_SOC_DRA7XX ) +#undef soc_is_dra7xx +#define soc_is_dra7xx () (of_machine_is_compatible("ti,dra7"))Wouldn't that be too expensive to call
of_machine_is_compatibleevery time for DRA7 detection?
Quoted 2 lines
Ideally these soc checks should happen only once at init (see PATCH 8/9 in the series for instance) so there should not be a 'every time' penalty.
Ok, Agreed then.
Quoted 31 lines
regards,
RajendraQuoted 26 lines
May be static variable can be used to store DRA7 presence status, smth. like this:
static inline int
is_dra7xx(void)
{
static intis_dra7= -1;if (
is_dra7< 0)
is_dra7=of_machine_is_compatible("ti,dra7");return !!is_dra7;
}(it's just an idea, not verified)
arch/arm/mach-omap2/soc.h IS_OMAP_TYPE(3430, 0x3430) · line 401
Quoted 6 lines
arch/arm/mach-omap2/soc.h +2
-0+#endif +/* Various silicon revisions for omap2 */ #define OMAP242X_CLASS 0x24200024#define OMAP2420_REV_ES1_0 OMAP242X_CLASSRegards,
-grygorii
PATCH v3 8/9 ARM: DRA7: hwmod: Reuse the soc_ops used for OMAP4/5
In reply to Rajendra NayakThe soc_ops for dra7xx devices can be completed reused from the ones used for omap4 and omap5 devices.
--- arch/arm/mach-omap2/omap_hwmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/omap_hwmod.c +1 -1
@@ -4113,7 +4113,7 @@ void __init omap_hwmod_init(void) soc_ops.assert_hardreset = _omap2_assert_hardreset; soc_ops.deassert_hardreset = _omap2_deassert_hardreset; soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted; - }else if (cpu_is_omap44xx () ||soc_is_omap54xx ()) { + }else if (cpu_is_omap44xx () ||soc_is_omap54xx () ||soc_is_dra7xx ()) { soc_ops.enable_module = _omap4_enable_module; soc_ops.disable_module = _omap4_disable_module; soc_ops.wait_target_ready = _omap4_wait_target_ready;
Signature · 1 line
1.7.9.5
PATCH v3 9/9 ARM: DRA7: Add the build support in omap2plus
In reply to Rajendra NayakFrom: R Sricharan <[email protected]>
Now that the needed pieces for DRA7 based SoCs' is present, enable the build support in omap2plus_defconfig
--- arch/arm/configs/omap2plus_defconfig | 1 + arch/arm/mach-omap2/Kconfig | 10 +++++++++- arch/arm/plat-omap/Kconfig | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-)
arch/arm/configs/omap2plus_defconfig +1 -0
@@ -306,3 +306,4 @@ CONFIG_TI_DAVINCI_MDIO=y CONFIG_TI_DAVINCI_CPDMA=y CONFIG_TI_CPSW=y CONFIG_AT803X_PHY=y +CONFIG_SOC_DRA7XX=y
arch/arm/mach-omap2/Kconfig +9 -1
@@ -118,7 +118,7 @@ config ARCH_OMAP2PLUS_TYPICAL select I2C select I2C_OMAP select MENELAUS if ARCH_OMAP2 - select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5 + select NEON if CPU_V7 select PM_RUNTIME select REGULATOR select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
@@ -135,6 +135,14 @@ config SOC_HAS_REALTIME_COUNTER depends on SOC_OMAP5 || SOC_DRA7XX default y +config SOC_DRA7XX + bool "TI DRA7XX" + select ARM_ARCH_TIMER + select CPU_V7 + select ARM_GIC + select HAVE_SMP + select COMMON_CLK + comment "OMAP Core Type" depends on ARCH_OMAP2
arch/arm/plat-omap/Kconfig +1 -1
@@ -106,7 +106,7 @@ config OMAP_32K_TIMER This timer saves power compared to the OMAP_MPU_TIMER, and has support for no tick during idle. The 32KHz timer provides less intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is - currently only available for OMAP16XX, 24XX, 34XX and OMAP4/5. + currently only available for OMAP16XX, 24XX, 34XX, OMAP4/5 and DRA7XX. On OMAP2PLUS this value is only used for CONFIG_HZ and CLOCK_TICK_RATE compile time calculation.
Signature · 1 line
1.7.9.5
v3 cover DRA7xx core support
In reply to Rajendra NayakQuoted 22 lines · Rajendra Nayak
Changes in v3:
-1- Dropped some clock/dpll framework builds for dra7 -2- Added all instances of IPs in dtsi file
-3- dtsi does a 'disabled' by default and dts enables as needed -4-soc_is_dra7xx()based on DT compatible instead of using ID codeChanges in v2:
-1- Fixed minor changelog details
-2- Dropped the SRAM support patch since we need to move todrivers/misc/sram.c-3- Added DTS update patches to this series which were earlier posted as part of the data series (Since they don't have much objections as against the other in-kernel data files)
-4- Updated the EVM dts file with pin config details for uart/mcspi and i2cDRA7xx based SoCs' are high-performance, infotainment application devices, based on enhanced OMAP architecture integrated on a 28nm technology.
The DRA7xx family is composed of DRA75x and DRA74x devices. The current device for which the patches add support is the DRA752 SoC.
Quoted 6 lines
Most of the core IPs are similar to those found on the OMAP5 devices, including the dual cortex-A15 based MPU subsystem, which has helped quite some reuse from existing OMAP5 support.
This series contains only core support patches and none of the PRCM and hwmod data needed for the device to boot.
Tony, any chance of this series making it to 3.12?
regards,
Rajendra
Quoted 46 lines
The bootloader support for the platform is already available in mainline u-boot.
The patches posted in this series are available at:
git://github.com/rrnayak/linux.gitfor-3.12/dra-core-v3The patches (including the ones for in-kernel data) which boot on dra7xx evm are available at:
t://github.com/rrnayak/linux.git out-of-tree/dra-integrated-v3R Sricharan (8):
ARM: DRA7: Reuse all of PRCM and MPUSS SMP infra
ARM: DRA7: Reuse io tables and add a new .init_early
ARM: DRA7: Resue the clocksource, clockevent support
ARM: DRA7: board-generic: Add basic DT support
ARM: DRA7:Kconfig: MakeARCH_NR_GPIOdefault to 512
ARM: DRA7: dts: Add the dts files for dra7 SoC and dra7-evm board
ARM: DRA7: id: Add cpu detection support for DRA7xx based SoCs'
ARM: DRA7: Add the build support in omap2plusRajendra Nayak (1):
ARM: DRA7: hwmod: Reuse thesoc_opsused for OMAP4/5.../devicetree/bindings/arm/omap/omap.txt | 3 + arch/arm/Kconfig | 2 +- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/dra7-evm.dts | 140 +++++ arch/arm/boot/dts/dra7.dtsi | 567 ++++++++++++++++++++ arch/arm/configs/omap2plus_defconfig | 1 + arch/arm/mach-omap1/include/mach/soc.h | 1 + arch/arm/mach-omap2/Kconfig | 12 +- arch/arm/mach-omap2/Makefile | 6 + arch/arm/mach-omap2/board-generic.c | 18 + arch/arm/mach-omap2/common.h | 1 + arch/arm/mach-omap2/id.c | 4 +- arch/arm/mach-omap2/io.c | 20 +- arch/arm/mach-omap2/omap54xx.h | 4 + arch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-omap2/soc.h | 17 + arch/arm/mach-omap2/timer.c | 3 +- arch/arm/plat-omap/Kconfig | 2 +- 18 files changed, 795 insertions(+), 11 deletions(-) create mode 100644 arch/arm/boot/dts/dra7-evm.dts create mode 100644 arch/arm/boot/dts/dra7.dtsi
Tony Lindgren
maintainerv3 cover DRA7xx core support
Quoted 23 lines · Rajendra Nayak
Quoted 22 lines · Rajendra Nayak
Changes in v3:
-1- Dropped some clock/dpll framework builds for dra7 -2- Added all instances of IPs in dtsi file
-3- dtsi does a 'disabled' by default and dts enables as needed -4-soc_is_dra7xx()based on DT compatible instead of using ID codeChanges in v2:
-1- Fixed minor changelog details
-2- Dropped the SRAM support patch since we need to move todrivers/misc/sram.c-3- Added DTS update patches to this series which were earlier posted as part of the data series (Since they don't have much objections as against the other in-kernel data files)
-4- Updated the EVM dts file with pin config details for uart/mcspi and i2cDRA7xx based SoCs' are high-performance, infotainment application devices, based on enhanced OMAP architecture integrated on a 28nm technology.
The DRA7xx family is composed of DRA75x and DRA74x devices. The current device for which the patches add support is the DRA752 SoC.
Quoted 8 lines
Quoted 6 lines
Most of the core IPs are similar to those found on the OMAP5 devices, including the dual cortex-A15 based MPU subsystem, which has helped quite some reuse from existing OMAP5 support.
This series contains only core support patches and none of the PRCM and hwmod data needed for the device to boot.
Tony, any chance of this series making it to 3.12?
Looks OK to me, want to do a pull request against -rc5 for me?
Regards,
Tony
v3 cover DRA7xx core support
Quoted 28 lines · Tony Lindgren
Quoted 27 lines · Rajendra Nayak
Quoted 26 lines · Rajendra Nayak
Changes in v3:
-1- Dropped some clock/dpll framework builds for dra7 -2- Added all instances of IPs in dtsi file
-3- dtsi does a 'disabled' by default and dts enables as needed -4-soc_is_dra7xx()based on DT compatible instead of using ID codeChanges in v2:
-1- Fixed minor changelog details
-2- Dropped the SRAM support patch since we need to move todrivers/misc/sram.c-3- Added DTS update patches to this series which were earlier posted as part of the data series (Since they don't have much objections as against the other in-kernel data files)
-4- Updated the EVM dts file with pin config details for uart/mcspi and i2cDRA7xx based SoCs' are high-performance, infotainment application devices, based on enhanced OMAP architecture integrated on a 28nm technology.
The DRA7xx family is composed of DRA75x and DRA74x devices. The current device for which the patches add support is the DRA752 SoC.
Most of the core IPs are similar to those found on the OMAP5 devices, including the dual cortex-A15 based MPU subsystem, which has helped quite some reuse from existing OMAP5 support.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
This series contains only core support patches and none of the PRCM and hwmod data needed for the device to boot.
Tony, any chance of this series making it to 3.12?
Looks OK to me, want to do a pull request against -rc5 for me?
Sure, will do. Thanks.
Quoted 5 lines
Regards,
Tony