* [PATCH 0/3] Add support for ADC on am437x-gp and am43x-epos-evm @ 2014-10-31 7:46 Vignesh R 2014-10-31 7:46 ` [PATCH 1/3] arm: mach-omap2: omap_hwmod_33xx_43xx_ipblock_data: Move am33xx_l4_hs_hwmod to ipblock_data Vignesh R ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Vignesh R @ 2014-10-31 7:46 UTC (permalink / raw) To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King, Tony Lindgren Cc: devicetree, linux-arm-kernel, linux-kernel, linux-omap, Vignesh R This series of patches enable ADC on am437x-gp-evm and am43x-epos-evm. The ADC clock hwmod data of am33xx has been moved to commom place so that both am43xx and am33xx can reuse them. tscadc DT node has been adided to am437x-gp and am43x-epos dt files. With these patches, ADC functionalities are now available on am43xx. Vignesh R (3): arm: mach-omap2: omap_hwmod_33xx_43xx_ipblock_data: Move am33xx_l4_hs_hwmod to ipblock_data arm: mach-omap2: omap_hwmod_43xx_data: add hwmod support for tscadc on am43x-evm arm: boot: dts: am4372: add tscadc DT entries for am437x-evm and am43x-epos-evm arch/arm/boot/dts/am4372.dtsi | 20 ++++++ arch/arm/boot/dts/am437x-gp-evm.dts | 8 +++ arch/arm/boot/dts/am43x-epos-evm.dts | 8 +++ .../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 2 + .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 79 ++++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 64 ------------------ arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 1 + 7 files changed, 118 insertions(+), 64 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] arm: mach-omap2: omap_hwmod_33xx_43xx_ipblock_data: Move am33xx_l4_hs_hwmod to ipblock_data 2014-10-31 7:46 [PATCH 0/3] Add support for ADC on am437x-gp and am43x-epos-evm Vignesh R @ 2014-10-31 7:46 ` Vignesh R 2014-10-31 7:46 ` [PATCH 2/3] arm: mach-omap2: omap_hwmod_43xx_data: add hwmod support for tscadc on am43x-evm Vignesh R 2014-10-31 7:46 ` [PATCH 3/3] arm: boot: dts: am4372: add tscadc DT entries for am437x-evm and am43x-epos-evm Vignesh R 2 siblings, 0 replies; 8+ messages in thread From: Vignesh R @ 2014-10-31 7:46 UTC (permalink / raw) To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King, Tony Lindgren Cc: devicetree, linux-arm-kernel, linux-kernel, linux-omap, Vignesh R This patch moves am33xx_l4_hs_hwmod from 33xx_data to ipblock_data. This is required because it can be reused in 43xx to add hwmod support to tscadc as it uses the same l4_hs hwmod in am43xx. This helps in setting appropriate clock domain names for tscadc on am33xx and am43xx. Signed-off-by: Vignesh R <vigneshr@ti.com> --- arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 1 + arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 15 +++++++++++++++ arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 15 --------------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h index 130332c0534d..6e57b8ad0db5 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h @@ -82,6 +82,7 @@ extern struct omap_hwmod am33xx_l3_main_hwmod; extern struct omap_hwmod am33xx_l3_s_hwmod; extern struct omap_hwmod am33xx_l3_instr_hwmod; extern struct omap_hwmod am33xx_l4_ls_hwmod; +extern struct omap_hwmod am33xx_l4_hs_hwmod; extern struct omap_hwmod am33xx_l4_wkup_hwmod; extern struct omap_hwmod am33xx_mpu_hwmod; extern struct omap_hwmod am33xx_pruss_hwmod; diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c index a579b89ce9b7..7f44922ab540 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c @@ -94,6 +94,21 @@ struct omap_hwmod am33xx_l4_ls_hwmod = { }, }; +/* l4_hs */ +struct omap_hwmod am33xx_l4_hs_hwmod = { + .name = "l4_hs", + .class = &am33xx_l4_hwmod_class, + .clkdm_name = "l4hs_clkdm", + .flags = HWMOD_INIT_NO_IDLE, + .main_clk = "l4hs_gclk", + .prcm = { + .omap4 = { + .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + /* l4_wkup */ struct omap_hwmod am33xx_l4_wkup_hwmod = { .name = "l4_wkup", diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index 6b406ca4bd3b..ce7d260495cb 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c @@ -63,21 +63,6 @@ static struct omap_hwmod am33xx_emif_hwmod = { }, }; -/* l4_hs */ -static struct omap_hwmod am33xx_l4_hs_hwmod = { - .name = "l4_hs", - .class = &am33xx_l4_hwmod_class, - .clkdm_name = "l4hs_clkdm", - .flags = HWMOD_INIT_NO_IDLE, - .main_clk = "l4hs_gclk", - .prcm = { - .omap4 = { - .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET, - .modulemode = MODULEMODE_SWCTRL, - }, - }, -}; - static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = { { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 }, }; -- 1.9.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] arm: mach-omap2: omap_hwmod_43xx_data: add hwmod support for tscadc on am43x-evm 2014-10-31 7:46 [PATCH 0/3] Add support for ADC on am437x-gp and am43x-epos-evm Vignesh R 2014-10-31 7:46 ` [PATCH 1/3] arm: mach-omap2: omap_hwmod_33xx_43xx_ipblock_data: Move am33xx_l4_hs_hwmod to ipblock_data Vignesh R @ 2014-10-31 7:46 ` Vignesh R 2014-10-31 13:44 ` Nishanth Menon 2014-10-31 7:46 ` [PATCH 3/3] arm: boot: dts: am4372: add tscadc DT entries for am437x-evm and am43x-epos-evm Vignesh R 2 siblings, 1 reply; 8+ messages in thread From: Vignesh R @ 2014-10-31 7:46 UTC (permalink / raw) To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King, Tony Lindgren Cc: devicetree, linux-arm-kernel, linux-kernel, linux-omap, Vignesh R This patch adds hwmod support for tscadc to work on am43xx-evm. The am33xx hwmod structures of tscadc has been moved to ipblock_data so that it can be reused in am43xx. The clock domain names are separately set for am33xx and am43xx. Thus tscadc dt entries can now be added to am43xx board dt files. Signed-off-by: Vignesh R <vigneshr@ti.com> --- .../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 1 + .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 64 ++++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 49 ----------------- arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 1 + 4 files changed, 66 insertions(+), 49 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h index 6e57b8ad0db5..b92a7c7825fa 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h @@ -65,6 +65,7 @@ extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer4; extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer5; extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer6; extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer7; +extern struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc; extern struct omap_hwmod_ocp_if am33xx_l3_main__tpcc; extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc0; extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc1; diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c index 7f44922ab540..ef14e56a3968 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c @@ -151,6 +151,54 @@ struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = { }; /* + * 'adc/tsc' class + * TouchScreen Controller (Anolog-To-Digital Converter) + */ +static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = { + .rev_offs = 0x00, + .sysc_offs = 0x10, + .sysc_flags = SYSC_HAS_SIDLEMODE, + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | + SIDLE_SMART_WKUP), + .sysc_fields = &omap_hwmod_sysc_type2, +}; + +static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = { + .name = "adc_tsc", + .sysc = &am33xx_adc_tsc_sysc, +}; + +struct omap_hwmod am33xx_adc_tsc_hwmod = { + .name = "adc_tsc", + .class = &am33xx_adc_tsc_hwmod_class, + .clkdm_name = "l4_wkup_clkdm", + .main_clk = "adc_tsc_fck", + .prcm = { + .omap4 = { + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +/* L4 WKUP -> ADC_TSC */ +static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = { + { + .pa_start = 0x44E0D000, + .pa_end = 0x44E0D000 + SZ_8K - 1, + .flags = ADDR_TYPE_RT + }, + { } +}; + +struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = { + .master = &am33xx_l4_wkup_hwmod, + .slave = &am33xx_adc_tsc_hwmod, + .clk = "dpll_core_m4_div2_ck", + .addr = am33xx_adc_tsc_addrs, + .user = OCP_USER_MPU, +}; + +/* * 'pru-icss' class * Programmable Real-Time Unit and Industrial Communication Subsystem */ @@ -1370,6 +1418,7 @@ static void omap_hwmod_am33xx_clkctrl(void) CLKCTRL(am33xx_timer5_hwmod, AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET); CLKCTRL(am33xx_timer6_hwmod, AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET); CLKCTRL(am33xx_timer7_hwmod, AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET); + CLKCTRL(am33xx_adc_tsc_hwmod, AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET); CLKCTRL(am33xx_smartreflex0_hwmod, AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET); CLKCTRL(am33xx_smartreflex1_hwmod, @@ -1398,6 +1447,18 @@ static void omap_hwmod_am33xx_clkctrl(void) CLKCTRL(am33xx_aes0_hwmod , AM33XX_CM_PER_AES0_CLKCTRL_OFFSET); } +static void am33xx_hwmod_clockdomain(void) +{ + am33xx_l4_hs_hwmod.clkdm_name = "l4hs_clkdm"; + am33xx_adc_tsc_hwmod.clkdm_name = "l4_wkup_clkdm"; +} + +static void am43xx_hwmod_clockdomain(void) +{ + am33xx_l4_hs_hwmod.clkdm_name = "l3_clkdm"; + am33xx_adc_tsc_hwmod.clkdm_name = "l3s_tsc_clkdm"; +} + static void omap_hwmod_am33xx_rst(void) { RSTCTRL(am33xx_pruss_hwmod, AM33XX_RM_PER_RSTCTRL_OFFSET); @@ -1409,6 +1470,7 @@ void omap_hwmod_am33xx_reg(void) { omap_hwmod_am33xx_clkctrl(); omap_hwmod_am33xx_rst(); + am33xx_hwmod_clockdomain(); } static void omap_hwmod_am43xx_clkctrl(void) @@ -1443,6 +1505,7 @@ static void omap_hwmod_am43xx_clkctrl(void) CLKCTRL(am33xx_timer5_hwmod, AM43XX_CM_PER_TIMER5_CLKCTRL_OFFSET); CLKCTRL(am33xx_timer6_hwmod, AM43XX_CM_PER_TIMER6_CLKCTRL_OFFSET); CLKCTRL(am33xx_timer7_hwmod, AM43XX_CM_PER_TIMER7_CLKCTRL_OFFSET); + CLKCTRL(am33xx_adc_tsc_hwmod, AM43XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET); CLKCTRL(am33xx_smartreflex0_hwmod, AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET); CLKCTRL(am33xx_smartreflex1_hwmod, @@ -1482,4 +1545,5 @@ void omap_hwmod_am43xx_reg(void) { omap_hwmod_am43xx_clkctrl(); omap_hwmod_am43xx_rst(); + am43xx_hwmod_clockdomain(); } diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index ce7d260495cb..c3ff14828850 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c @@ -88,37 +88,6 @@ static struct omap_hwmod am33xx_wkup_m3_hwmod = { }; /* - * 'adc/tsc' class - * TouchScreen Controller (Anolog-To-Digital Converter) - */ -static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = { - .rev_offs = 0x00, - .sysc_offs = 0x10, - .sysc_flags = SYSC_HAS_SIDLEMODE, - .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | - SIDLE_SMART_WKUP), - .sysc_fields = &omap_hwmod_sysc_type2, -}; - -static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = { - .name = "adc_tsc", - .sysc = &am33xx_adc_tsc_sysc, -}; - -static struct omap_hwmod am33xx_adc_tsc_hwmod = { - .name = "adc_tsc", - .class = &am33xx_adc_tsc_hwmod_class, - .clkdm_name = "l4_wkup_clkdm", - .main_clk = "adc_tsc_fck", - .prcm = { - .omap4 = { - .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET, - .modulemode = MODULEMODE_SWCTRL, - }, - }, -}; - -/* * Modules omap_hwmod structures * * The following IPs are excluded for the moment because: @@ -426,24 +395,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; -/* L4 WKUP -> ADC_TSC */ -static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = { - { - .pa_start = 0x44E0D000, - .pa_end = 0x44E0D000 + SZ_8K - 1, - .flags = ADDR_TYPE_RT - }, - { } -}; - -static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = { - .master = &am33xx_l4_wkup_hwmod, - .slave = &am33xx_adc_tsc_hwmod, - .clk = "dpll_core_m4_div2_ck", - .addr = am33xx_adc_tsc_addrs, - .user = OCP_USER_MPU, -}; - static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = { .master = &am33xx_l4_hs_hwmod, .slave = &am33xx_cpgmac0_hwmod, diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c index fea01aa3ef42..3ce8d28c0f9a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c @@ -809,6 +809,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { &am33xx_l4_ls__timer5, &am33xx_l4_ls__timer6, &am33xx_l4_ls__timer7, + &am33xx_l4_wkup__adc_tsc, &am33xx_l3_main__tpcc, &am33xx_l4_ls__uart2, &am33xx_l4_ls__uart3, -- 1.9.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] arm: mach-omap2: omap_hwmod_43xx_data: add hwmod support for tscadc on am43x-evm 2014-10-31 7:46 ` [PATCH 2/3] arm: mach-omap2: omap_hwmod_43xx_data: add hwmod support for tscadc on am43x-evm Vignesh R @ 2014-10-31 13:44 ` Nishanth Menon 2014-11-04 11:15 ` Vignesh R 0 siblings, 1 reply; 8+ messages in thread From: Nishanth Menon @ 2014-10-31 13:44 UTC (permalink / raw) To: Vignesh R Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King, Tony Lindgren, devicetree, linux-arm-kernel, linux-kernel, linux-omap On 13:16-20141031, Vignesh R wrote: > This patch adds hwmod support for tscadc to work on am43xx-evm. The am33xx > hwmod structures of tscadc has been moved to ipblock_data so that it can > be reused in am43xx. The clock domain names are separately set for am33xx > and am43xx. Thus tscadc dt entries can now be added to am43xx board > dt files. > > Signed-off-by: Vignesh R <vigneshr@ti.com> > --- > .../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 1 + > .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 64 ++++++++++++++++++++++ > arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 49 ----------------- > arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 1 + > 4 files changed, 66 insertions(+), 49 deletions(-) > > diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h > index 6e57b8ad0db5..b92a7c7825fa 100644 > --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h > +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h > @@ -65,6 +65,7 @@ extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer4; > extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer5; > extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer6; > extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer7; > +extern struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc; > extern struct omap_hwmod_ocp_if am33xx_l3_main__tpcc; > extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc0; > extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc1; > diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c > index 7f44922ab540..ef14e56a3968 100644 > --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c > +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c > @@ -151,6 +151,54 @@ struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = { > }; > > /* > + * 'adc/tsc' class > + * TouchScreen Controller (Anolog-To-Digital Converter) > + */ > +static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = { > + .rev_offs = 0x00, > + .sysc_offs = 0x10, > + .sysc_flags = SYSC_HAS_SIDLEMODE, > + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | > + SIDLE_SMART_WKUP), > + .sysc_fields = &omap_hwmod_sysc_type2, > +}; > + > +static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = { > + .name = "adc_tsc", > + .sysc = &am33xx_adc_tsc_sysc, > +}; > + > +struct omap_hwmod am33xx_adc_tsc_hwmod = { > + .name = "adc_tsc", > + .class = &am33xx_adc_tsc_hwmod_class, > + .clkdm_name = "l4_wkup_clkdm", > + .main_clk = "adc_tsc_fck", > + .prcm = { > + .omap4 = { > + .modulemode = MODULEMODE_SWCTRL, > + }, > + }, > +}; > + > +/* L4 WKUP -> ADC_TSC */ > +static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = { > + { > + .pa_start = 0x44E0D000, > + .pa_end = 0x44E0D000 + SZ_8K - 1, > + .flags = ADDR_TYPE_RT > + }, > + { } > +}; NAK. we dont want to see phy addresses in hwmod anymore. please add that to DT. I suggest doing that clean up prior to this patch. > + > +struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = { > + .master = &am33xx_l4_wkup_hwmod, > + .slave = &am33xx_adc_tsc_hwmod, > + .clk = "dpll_core_m4_div2_ck", > + .addr = am33xx_adc_tsc_addrs, > + .user = OCP_USER_MPU, > +}; > + > +/* > * 'pru-icss' class > * Programmable Real-Time Unit and Industrial Communication Subsystem > */ > @@ -1370,6 +1418,7 @@ static void omap_hwmod_am33xx_clkctrl(void) > CLKCTRL(am33xx_timer5_hwmod, AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET); > CLKCTRL(am33xx_timer6_hwmod, AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET); > CLKCTRL(am33xx_timer7_hwmod, AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET); > + CLKCTRL(am33xx_adc_tsc_hwmod, AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET); > CLKCTRL(am33xx_smartreflex0_hwmod, > AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET); > CLKCTRL(am33xx_smartreflex1_hwmod, > @@ -1398,6 +1447,18 @@ static void omap_hwmod_am33xx_clkctrl(void) > CLKCTRL(am33xx_aes0_hwmod , AM33XX_CM_PER_AES0_CLKCTRL_OFFSET); > } > > +static void am33xx_hwmod_clockdomain(void) > +{ > + am33xx_l4_hs_hwmod.clkdm_name = "l4hs_clkdm"; > + am33xx_adc_tsc_hwmod.clkdm_name = "l4_wkup_clkdm"; > +} > + > +static void am43xx_hwmod_clockdomain(void) > +{ > + am33xx_l4_hs_hwmod.clkdm_name = "l3_clkdm"; > + am33xx_adc_tsc_hwmod.clkdm_name = "l3s_tsc_clkdm"; > +} > + maybe do something similar to CLKCTRL macro? > static void omap_hwmod_am33xx_rst(void) > { > RSTCTRL(am33xx_pruss_hwmod, AM33XX_RM_PER_RSTCTRL_OFFSET); > @@ -1409,6 +1470,7 @@ void omap_hwmod_am33xx_reg(void) > { > omap_hwmod_am33xx_clkctrl(); > omap_hwmod_am33xx_rst(); > + am33xx_hwmod_clockdomain(); > } > > static void omap_hwmod_am43xx_clkctrl(void) > @@ -1443,6 +1505,7 @@ static void omap_hwmod_am43xx_clkctrl(void) > CLKCTRL(am33xx_timer5_hwmod, AM43XX_CM_PER_TIMER5_CLKCTRL_OFFSET); > CLKCTRL(am33xx_timer6_hwmod, AM43XX_CM_PER_TIMER6_CLKCTRL_OFFSET); > CLKCTRL(am33xx_timer7_hwmod, AM43XX_CM_PER_TIMER7_CLKCTRL_OFFSET); > + CLKCTRL(am33xx_adc_tsc_hwmod, AM43XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET); > CLKCTRL(am33xx_smartreflex0_hwmod, > AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET); > CLKCTRL(am33xx_smartreflex1_hwmod, > @@ -1482,4 +1545,5 @@ void omap_hwmod_am43xx_reg(void) > { > omap_hwmod_am43xx_clkctrl(); > omap_hwmod_am43xx_rst(); > + am43xx_hwmod_clockdomain(); > } > diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c > index ce7d260495cb..c3ff14828850 100644 > --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c > +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c > @@ -88,37 +88,6 @@ static struct omap_hwmod am33xx_wkup_m3_hwmod = { > }; > > /* > - * 'adc/tsc' class > - * TouchScreen Controller (Anolog-To-Digital Converter) > - */ > -static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = { > - .rev_offs = 0x00, > - .sysc_offs = 0x10, > - .sysc_flags = SYSC_HAS_SIDLEMODE, > - .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | > - SIDLE_SMART_WKUP), > - .sysc_fields = &omap_hwmod_sysc_type2, > -}; > - > -static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = { > - .name = "adc_tsc", > - .sysc = &am33xx_adc_tsc_sysc, > -}; > - > -static struct omap_hwmod am33xx_adc_tsc_hwmod = { > - .name = "adc_tsc", > - .class = &am33xx_adc_tsc_hwmod_class, > - .clkdm_name = "l4_wkup_clkdm", > - .main_clk = "adc_tsc_fck", > - .prcm = { > - .omap4 = { > - .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET, > - .modulemode = MODULEMODE_SWCTRL, > - }, > - }, > -}; > - > -/* > * Modules omap_hwmod structures > * > * The following IPs are excluded for the moment because: > @@ -426,24 +395,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = { > .user = OCP_USER_MPU | OCP_USER_SDMA, > }; > > -/* L4 WKUP -> ADC_TSC */ > -static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = { > - { > - .pa_start = 0x44E0D000, > - .pa_end = 0x44E0D000 + SZ_8K - 1, > - .flags = ADDR_TYPE_RT > - }, > - { } > -}; > - > -static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = { > - .master = &am33xx_l4_wkup_hwmod, > - .slave = &am33xx_adc_tsc_hwmod, > - .clk = "dpll_core_m4_div2_ck", > - .addr = am33xx_adc_tsc_addrs, > - .user = OCP_USER_MPU, > -}; > - > static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = { > .master = &am33xx_l4_hs_hwmod, > .slave = &am33xx_cpgmac0_hwmod, > diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c > index fea01aa3ef42..3ce8d28c0f9a 100644 > --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c > +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c > @@ -809,6 +809,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { > &am33xx_l4_ls__timer5, > &am33xx_l4_ls__timer6, > &am33xx_l4_ls__timer7, > + &am33xx_l4_wkup__adc_tsc, > &am33xx_l3_main__tpcc, > &am33xx_l4_ls__uart2, > &am33xx_l4_ls__uart3, > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] arm: mach-omap2: omap_hwmod_43xx_data: add hwmod support for tscadc on am43x-evm 2014-10-31 13:44 ` Nishanth Menon @ 2014-11-04 11:15 ` Vignesh R 0 siblings, 0 replies; 8+ messages in thread From: Vignesh R @ 2014-11-04 11:15 UTC (permalink / raw) To: Nishanth Menon Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King, Tony Lindgren, devicetree, linux-arm-kernel, linux-kernel, linux-omap On Friday 31 October 2014 07:14 PM, Nishanth Menon wrote: > On 13:16-20141031, Vignesh R wrote: >> This patch adds hwmod support for tscadc to work on am43xx-evm. The am33xx >> hwmod structures of tscadc has been moved to ipblock_data so that it can >> be reused in am43xx. The clock domain names are separately set for am33xx >> and am43xx. Thus tscadc dt entries can now be added to am43xx board >> dt files. >> >> Signed-off-by: Vignesh R <vigneshr@ti.com> >> --- >> .../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 1 + >> .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 64 ++++++++++++++++++++++ >> arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 49 ----------------- >> arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 1 + >> 4 files changed, 66 insertions(+), 49 deletions(-) >> >> diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h >> index 6e57b8ad0db5..b92a7c7825fa 100644 >> --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h >> +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h >> @@ -65,6 +65,7 @@ extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer4; >> extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer5; >> extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer6; >> extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer7; >> +extern struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc; >> extern struct omap_hwmod_ocp_if am33xx_l3_main__tpcc; >> extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc0; >> extern struct omap_hwmod_ocp_if am33xx_l3_main__tptc1; >> diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c >> index 7f44922ab540..ef14e56a3968 100644 >> --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c >> +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c >> @@ -151,6 +151,54 @@ struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = { >> }; >> >> /* >> + * 'adc/tsc' class >> + * TouchScreen Controller (Anolog-To-Digital Converter) >> + */ >> +static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = { >> + .rev_offs = 0x00, >> + .sysc_offs = 0x10, >> + .sysc_flags = SYSC_HAS_SIDLEMODE, >> + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | >> + SIDLE_SMART_WKUP), >> + .sysc_fields = &omap_hwmod_sysc_type2, >> +}; >> + >> +static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = { >> + .name = "adc_tsc", >> + .sysc = &am33xx_adc_tsc_sysc, >> +}; >> + >> +struct omap_hwmod am33xx_adc_tsc_hwmod = { >> + .name = "adc_tsc", >> + .class = &am33xx_adc_tsc_hwmod_class, >> + .clkdm_name = "l4_wkup_clkdm", >> + .main_clk = "adc_tsc_fck", >> + .prcm = { >> + .omap4 = { >> + .modulemode = MODULEMODE_SWCTRL, >> + }, >> + }, >> +}; >> + >> +/* L4 WKUP -> ADC_TSC */ >> +static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = { >> + { >> + .pa_start = 0x44E0D000, >> + .pa_end = 0x44E0D000 + SZ_8K - 1, >> + .flags = ADDR_TYPE_RT >> + }, >> + { } >> +}; > > NAK. we dont want to see phy addresses in hwmod anymore. please add that > to DT. I suggest doing that clean up prior to this patch. > Will drop this and pass address from DT >> + >> +struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = { >> + .master = &am33xx_l4_wkup_hwmod, >> + .slave = &am33xx_adc_tsc_hwmod, >> + .clk = "dpll_core_m4_div2_ck", >> + .addr = am33xx_adc_tsc_addrs, >> + .user = OCP_USER_MPU, >> +}; >> + >> +/* >> * 'pru-icss' class >> * Programmable Real-Time Unit and Industrial Communication Subsystem >> */ >> @@ -1370,6 +1418,7 @@ static void omap_hwmod_am33xx_clkctrl(void) >> CLKCTRL(am33xx_timer5_hwmod, AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET); >> CLKCTRL(am33xx_timer6_hwmod, AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET); >> CLKCTRL(am33xx_timer7_hwmod, AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET); >> + CLKCTRL(am33xx_adc_tsc_hwmod, AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET); >> CLKCTRL(am33xx_smartreflex0_hwmod, >> AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET); >> CLKCTRL(am33xx_smartreflex1_hwmod, >> @@ -1398,6 +1447,18 @@ static void omap_hwmod_am33xx_clkctrl(void) >> CLKCTRL(am33xx_aes0_hwmod , AM33XX_CM_PER_AES0_CLKCTRL_OFFSET); >> } >> >> +static void am33xx_hwmod_clockdomain(void) >> +{ >> + am33xx_l4_hs_hwmod.clkdm_name = "l4hs_clkdm"; >> + am33xx_adc_tsc_hwmod.clkdm_name = "l4_wkup_clkdm"; >> +} >> + >> +static void am43xx_hwmod_clockdomain(void) >> +{ >> + am33xx_l4_hs_hwmod.clkdm_name = "l3_clkdm"; >> + am33xx_adc_tsc_hwmod.clkdm_name = "l3s_tsc_clkdm"; >> +} >> + > > maybe do something similar to CLKCTRL macro? > OK, I will create a macro for clkdm_name. >> static void omap_hwmod_am33xx_rst(void) >> { >> RSTCTRL(am33xx_pruss_hwmod, AM33XX_RM_PER_RSTCTRL_OFFSET); >> @@ -1409,6 +1470,7 @@ void omap_hwmod_am33xx_reg(void) >> { >> omap_hwmod_am33xx_clkctrl(); >> omap_hwmod_am33xx_rst(); >> + am33xx_hwmod_clockdomain(); >> } >> >> static void omap_hwmod_am43xx_clkctrl(void) >> @@ -1443,6 +1505,7 @@ static void omap_hwmod_am43xx_clkctrl(void) >> CLKCTRL(am33xx_timer5_hwmod, AM43XX_CM_PER_TIMER5_CLKCTRL_OFFSET); >> CLKCTRL(am33xx_timer6_hwmod, AM43XX_CM_PER_TIMER6_CLKCTRL_OFFSET); >> CLKCTRL(am33xx_timer7_hwmod, AM43XX_CM_PER_TIMER7_CLKCTRL_OFFSET); >> + CLKCTRL(am33xx_adc_tsc_hwmod, AM43XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET); >> CLKCTRL(am33xx_smartreflex0_hwmod, >> AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET); >> CLKCTRL(am33xx_smartreflex1_hwmod, >> @@ -1482,4 +1545,5 @@ void omap_hwmod_am43xx_reg(void) >> { >> omap_hwmod_am43xx_clkctrl(); >> omap_hwmod_am43xx_rst(); >> + am43xx_hwmod_clockdomain(); >> } >> diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c >> index ce7d260495cb..c3ff14828850 100644 >> --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c >> +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c >> @@ -88,37 +88,6 @@ static struct omap_hwmod am33xx_wkup_m3_hwmod = { >> }; >> >> /* >> - * 'adc/tsc' class >> - * TouchScreen Controller (Anolog-To-Digital Converter) >> - */ >> -static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = { >> - .rev_offs = 0x00, >> - .sysc_offs = 0x10, >> - .sysc_flags = SYSC_HAS_SIDLEMODE, >> - .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | >> - SIDLE_SMART_WKUP), >> - .sysc_fields = &omap_hwmod_sysc_type2, >> -}; >> - >> -static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = { >> - .name = "adc_tsc", >> - .sysc = &am33xx_adc_tsc_sysc, >> -}; >> - >> -static struct omap_hwmod am33xx_adc_tsc_hwmod = { >> - .name = "adc_tsc", >> - .class = &am33xx_adc_tsc_hwmod_class, >> - .clkdm_name = "l4_wkup_clkdm", >> - .main_clk = "adc_tsc_fck", >> - .prcm = { >> - .omap4 = { >> - .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET, >> - .modulemode = MODULEMODE_SWCTRL, >> - }, >> - }, >> -}; >> - >> -/* >> * Modules omap_hwmod structures >> * >> * The following IPs are excluded for the moment because: >> @@ -426,24 +395,6 @@ static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = { >> .user = OCP_USER_MPU | OCP_USER_SDMA, >> }; >> >> -/* L4 WKUP -> ADC_TSC */ >> -static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = { >> - { >> - .pa_start = 0x44E0D000, >> - .pa_end = 0x44E0D000 + SZ_8K - 1, >> - .flags = ADDR_TYPE_RT >> - }, >> - { } >> -}; >> - >> -static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = { >> - .master = &am33xx_l4_wkup_hwmod, >> - .slave = &am33xx_adc_tsc_hwmod, >> - .clk = "dpll_core_m4_div2_ck", >> - .addr = am33xx_adc_tsc_addrs, >> - .user = OCP_USER_MPU, >> -}; >> - >> static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = { >> .master = &am33xx_l4_hs_hwmod, >> .slave = &am33xx_cpgmac0_hwmod, >> diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c >> index fea01aa3ef42..3ce8d28c0f9a 100644 >> --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c >> +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c >> @@ -809,6 +809,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { >> &am33xx_l4_ls__timer5, >> &am33xx_l4_ls__timer6, >> &am33xx_l4_ls__timer7, >> + &am33xx_l4_wkup__adc_tsc, >> &am33xx_l3_main__tpcc, >> &am33xx_l4_ls__uart2, >> &am33xx_l4_ls__uart3, >> -- >> 1.9.1 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-omap" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] arm: boot: dts: am4372: add tscadc DT entries for am437x-evm and am43x-epos-evm 2014-10-31 7:46 [PATCH 0/3] Add support for ADC on am437x-gp and am43x-epos-evm Vignesh R 2014-10-31 7:46 ` [PATCH 1/3] arm: mach-omap2: omap_hwmod_33xx_43xx_ipblock_data: Move am33xx_l4_hs_hwmod to ipblock_data Vignesh R 2014-10-31 7:46 ` [PATCH 2/3] arm: mach-omap2: omap_hwmod_43xx_data: add hwmod support for tscadc on am43x-evm Vignesh R @ 2014-10-31 7:46 ` Vignesh R 2014-10-31 13:46 ` Nishanth Menon 2 siblings, 1 reply; 8+ messages in thread From: Vignesh R @ 2014-10-31 7:46 UTC (permalink / raw) To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King, Tony Lindgren Cc: devicetree, linux-arm-kernel, linux-kernel, linux-omap, Vignesh R This patch adds tscadc DT entries for am437x-gp-evm and am43x-epos-evm. Signed-off-by: Vignesh R <vigneshr@ti.com> --- arch/arm/boot/dts/am4372.dtsi | 20 ++++++++++++++++++++ arch/arm/boot/dts/am437x-gp-evm.dts | 8 ++++++++ arch/arm/boot/dts/am43x-epos-evm.dts | 8 ++++++++ 3 files changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index 46660ffd2b65..fd2de8f256e6 100644 --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi @@ -667,6 +667,26 @@ }; }; + tscadc: tscadc@44e0d000 { + compatible = "ti,am4372-tscadc","ti,am3359-tscadc"; + reg = <0x44e0d000 0x1000>; + ti,hwmods = "adc_tsc"; + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&adc_tsc_fck>; + clock-names = "fck"; + status = "disabled"; + + tsc { + compatible = "ti,am4372-tsc", "ti,am3359-tsc"; + }; + + adc { + #io-channel-cells = <1>; + compatible = "ti,am4372-adc", "ti,am3359-adc"; + }; + + }; + sham: sham@53100000 { compatible = "ti,omap5-sham"; ti,hwmods = "sham"; diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts index e7ac47fa6615..2ffd6d6dcc87 100644 --- a/arch/arm/boot/dts/am437x-gp-evm.dts +++ b/arch/arm/boot/dts/am437x-gp-evm.dts @@ -343,6 +343,14 @@ status = "okay"; }; +&tscadc { + status = "okay"; + + adc { + ti,adc-channels = <0 1 2 3 4 5 6 7>; + }; +}; + &ecap0 { status = "okay"; pinctrl-names = "default"; diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts index ac3e4859935f..f9bc607f3b3a 100644 --- a/arch/arm/boot/dts/am43x-epos-evm.dts +++ b/arch/arm/boot/dts/am43x-epos-evm.dts @@ -519,6 +519,14 @@ status = "okay"; }; +&tscadc { + status = "okay"; + + adc { + ti,adc-channels = <0 1 2 3 4 5 6 7>; + }; +}; + &ecap0 { status = "okay"; pinctrl-names = "default"; -- 1.9.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] arm: boot: dts: am4372: add tscadc DT entries for am437x-evm and am43x-epos-evm 2014-10-31 7:46 ` [PATCH 3/3] arm: boot: dts: am4372: add tscadc DT entries for am437x-evm and am43x-epos-evm Vignesh R @ 2014-10-31 13:46 ` Nishanth Menon 2014-11-04 11:15 ` Vignesh R 0 siblings, 1 reply; 8+ messages in thread From: Nishanth Menon @ 2014-10-31 13:46 UTC (permalink / raw) To: Vignesh R Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Russell King, Tony Lindgren, devicetree, linux-arm-kernel, linux-kernel, linux-omap On 13:16-20141031, Vignesh R wrote: > This patch adds tscadc DT entries for am437x-gp-evm and am43x-epos-evm. > > Signed-off-by: Vignesh R <vigneshr@ti.com> > --- > arch/arm/boot/dts/am4372.dtsi | 20 ++++++++++++++++++++ > arch/arm/boot/dts/am437x-gp-evm.dts | 8 ++++++++ > arch/arm/boot/dts/am43x-epos-evm.dts | 8 ++++++++ I personally prefer the soc dt split off from board dt, but others prefer this as done here.. no objections either way. > 3 files changed, 36 insertions(+) > > diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi > index 46660ffd2b65..fd2de8f256e6 100644 > --- a/arch/arm/boot/dts/am4372.dtsi > +++ b/arch/arm/boot/dts/am4372.dtsi > @@ -667,6 +667,26 @@ > }; > }; > > + tscadc: tscadc@44e0d000 { > + compatible = "ti,am4372-tscadc","ti,am3359-tscadc"; ^^ bindings ? $ git grep ti,am4372-tscadc Documentation/devicetree/bindings/ returns nothing as of 3.18-rc2 > + reg = <0x44e0d000 0x1000>; > + ti,hwmods = "adc_tsc"; > + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&adc_tsc_fck>; > + clock-names = "fck"; > + status = "disabled"; > + > + tsc { > + compatible = "ti,am4372-tsc", "ti,am3359-tsc"; > + }; > + > + adc { > + #io-channel-cells = <1>; > + compatible = "ti,am4372-adc", "ti,am3359-adc"; > + }; > + > + }; > + > sham: sham@53100000 { > compatible = "ti,omap5-sham"; > ti,hwmods = "sham"; > diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts > index e7ac47fa6615..2ffd6d6dcc87 100644 > --- a/arch/arm/boot/dts/am437x-gp-evm.dts > +++ b/arch/arm/boot/dts/am437x-gp-evm.dts > @@ -343,6 +343,14 @@ > status = "okay"; > }; > > +&tscadc { > + status = "okay"; > + > + adc { > + ti,adc-channels = <0 1 2 3 4 5 6 7>; > + }; > +}; > + > &ecap0 { > status = "okay"; > pinctrl-names = "default"; > diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts > index ac3e4859935f..f9bc607f3b3a 100644 > --- a/arch/arm/boot/dts/am43x-epos-evm.dts > +++ b/arch/arm/boot/dts/am43x-epos-evm.dts > @@ -519,6 +519,14 @@ > status = "okay"; > }; > > +&tscadc { > + status = "okay"; > + > + adc { > + ti,adc-channels = <0 1 2 3 4 5 6 7>; > + }; > +}; > + > &ecap0 { > status = "okay"; > pinctrl-names = "default"; > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] arm: boot: dts: am4372: add tscadc DT entries for am437x-evm and am43x-epos-evm 2014-10-31 13:46 ` Nishanth Menon @ 2014-11-04 11:15 ` Vignesh R 0 siblings, 0 replies; 8+ messages in thread From: Vignesh R @ 2014-11-04 11:15 UTC (permalink / raw) To: Nishanth Menon Cc: Mark Rutland, devicetree, Russell King, Pawel Moll, Ian Campbell, Tony Lindgren, linux-kernel, Rob Herring, Kumar Gala, linux-omap, linux-arm-kernel On Friday 31 October 2014 07:16 PM, Nishanth Menon wrote: > On 13:16-20141031, Vignesh R wrote: >> This patch adds tscadc DT entries for am437x-gp-evm and am43x-epos-evm. >> >> Signed-off-by: Vignesh R <vigneshr@ti.com> >> --- >> arch/arm/boot/dts/am4372.dtsi | 20 ++++++++++++++++++++ >> arch/arm/boot/dts/am437x-gp-evm.dts | 8 ++++++++ >> arch/arm/boot/dts/am43x-epos-evm.dts | 8 ++++++++ > > I personally prefer the soc dt split off from board dt, but others > prefer this as done here.. no objections either way. > >> 3 files changed, 36 insertions(+) >> >> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi >> index 46660ffd2b65..fd2de8f256e6 100644 >> --- a/arch/arm/boot/dts/am4372.dtsi >> +++ b/arch/arm/boot/dts/am4372.dtsi >> @@ -667,6 +667,26 @@ >> }; >> }; >> >> + tscadc: tscadc@44e0d000 { >> + compatible = "ti,am4372-tscadc","ti,am3359-tscadc"; > ^^ bindings ? > $ git grep ti,am4372-tscadc Documentation/devicetree/bindings/ > returns nothing as of 3.18-rc2 > I will drop unused ti,am4372-tscadc. >> + reg = <0x44e0d000 0x1000>; >> + ti,hwmods = "adc_tsc"; >> + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; >> + clocks = <&adc_tsc_fck>; >> + clock-names = "fck"; >> + status = "disabled"; >> + >> + tsc { >> + compatible = "ti,am4372-tsc", "ti,am3359-tsc"; >> + }; >> + >> + adc { >> + #io-channel-cells = <1>; >> + compatible = "ti,am4372-adc", "ti,am3359-adc"; >> + }; >> + >> + }; >> + >> sham: sham@53100000 { >> compatible = "ti,omap5-sham"; >> ti,hwmods = "sham"; >> diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts >> index e7ac47fa6615..2ffd6d6dcc87 100644 >> --- a/arch/arm/boot/dts/am437x-gp-evm.dts >> +++ b/arch/arm/boot/dts/am437x-gp-evm.dts >> @@ -343,6 +343,14 @@ >> status = "okay"; >> }; >> >> +&tscadc { >> + status = "okay"; >> + >> + adc { >> + ti,adc-channels = <0 1 2 3 4 5 6 7>; >> + }; >> +}; >> + >> &ecap0 { >> status = "okay"; >> pinctrl-names = "default"; >> diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts >> index ac3e4859935f..f9bc607f3b3a 100644 >> --- a/arch/arm/boot/dts/am43x-epos-evm.dts >> +++ b/arch/arm/boot/dts/am43x-epos-evm.dts >> @@ -519,6 +519,14 @@ >> status = "okay"; >> }; >> >> +&tscadc { >> + status = "okay"; >> + >> + adc { >> + ti,adc-channels = <0 1 2 3 4 5 6 7>; >> + }; >> +}; >> + >> &ecap0 { >> status = "okay"; >> pinctrl-names = "default"; >> -- >> 1.9.1 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-omap" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-11-04 11:15 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-31 7:46 [PATCH 0/3] Add support for ADC on am437x-gp and am43x-epos-evm Vignesh R 2014-10-31 7:46 ` [PATCH 1/3] arm: mach-omap2: omap_hwmod_33xx_43xx_ipblock_data: Move am33xx_l4_hs_hwmod to ipblock_data Vignesh R 2014-10-31 7:46 ` [PATCH 2/3] arm: mach-omap2: omap_hwmod_43xx_data: add hwmod support for tscadc on am43x-evm Vignesh R 2014-10-31 13:44 ` Nishanth Menon 2014-11-04 11:15 ` Vignesh R 2014-10-31 7:46 ` [PATCH 3/3] arm: boot: dts: am4372: add tscadc DT entries for am437x-evm and am43x-epos-evm Vignesh R 2014-10-31 13:46 ` Nishanth Menon 2014-11-04 11:15 ` Vignesh R
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).