OMAP System Control Module
Subsystems (10)
Tony Lindgren
maintainerRFC PATCH v2 3/11 mfd: omap: control: core system control driver
In reply to Konstantin BaydarovQuoted 6 lines · Konstantin Baydarov
So,the same API set (omap_control_readl/omap_control_writel) was added to
omap-control-core.c.If
omap-control-core.cshould only service users from driver/ directory, than I agree - we can remove
omap_control_readl/omap_control_writel fromomap-control-core.c.
But IIUC you are agree to "switch"arch/arm/mach-omap2/id.cfromcontrol.ctoomap-control-core.c. Ifarch/arm/mach-omap2/id.cis switched tocontrol.c, then I guess allarch/arm/mach-omap2/*.cshould be "switched" toomap-control-core.cas well. But this means thatomap-control-core.cshould provide omap_control_readl/omap_control_writel API.
Can't you just add something like int omap_ctrl_read_status(void) that id.c can use?
Tony
RFC PATCH v2 4/11 OMAP2+: use control module mfd driver in omap_type
In reply to Eduardo ValentinOMAP system control module can be probed early, then omap_type is safe to use its APIs.
TODO: add support for other omap versions
--- arch/arm/mach-omap2/id.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/id.c +4 -1
@@ -18,6 +18,7 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/io.h> +#include <linux/mfd/omap_control.h> #include <asm/cputype.h>
@@ -38,6 +39,8 @@ unsigned int omap_rev(void) }EXPORT_SYMBOL (omap_rev); +u32 omap_control_readl (u16 offset); +int omap_type (void ) {u32 val =0 ;
@@ -49,7 +52,7 @@ int omap_type(void) }else if (cpu_is_omap34xx ()) { val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); }else if (cpu_is_omap44xx ()) { - val =omap_ctrl_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); + val =omap_control_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); }else {pr_err ("Cannot detect omap type!\n" ); goto out;
Tony Lindgren
maintainerRFC PATCH v2 4/11 OMAP2+: use control module mfd driver in omap_type
Quoted 33 lines · Konstantin Baydarov
OMAP system control module can be probed early, then
omap_typeis safe to use its APIs.TODO: add support for other omap versions
Signed-off-by Konstantin Baydarov <[email protected]>--- arch/arm/mach-omap2/id.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Index:
linux-2.6/arch/arm/mach-omap2/id.c
===================================================================arch/arm/mach-omap2/id.c +3
-0@@ -18,6 +18,7 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/io.h> +#include <linux/mfd/omap_control.h> #include <asm/cputype.h> @@ -38,6 +39,8 @@ unsigned int omap_rev(void) }EXPORT_SYMBOL (omap_rev); +u32 omap_control_readl (u16 offset); +int omap_type (void ) {u32 val =0 ;
arch/arm/mach-omap2/id.c int omap_type(void) · line 55
Quoted 5 lines
arch/arm/mach-omap2/id.c +1
-1@@ -49,7 +52,7 @@ int omap_type(void) }else if (cpu_is_omap34xx ()) { val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); }else if (cpu_is_omap44xx ()) { - val =omap_ctrl_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); + val =omap_control_readl (OMAP4_CTRL_MODULE_CORE_STATUS );
Please just set up a function in the ctrl module core to return the status so you can get rid of omap_control_readl here.
Tony
RFC PATCH v2 5/11 mfd: omap: control: usb-phy: introduce the ctrl-module usb driver
In reply to Eduardo ValentinCreated a new platform driver for the platform device created by the control module mfd core, wrt usb. This driver has API's to power on/off the phy and the API's to write to musb mailbox.
Changes since previous version:
- Bandgap and usb phy: drivers are now independent from control module driver, they use their own API functions. Dependency was removed from Kconfig.
- Bandgap and usb phy: Added private spinlocks for bandgap and usb drivers.
(p.s. the mailbox for musb in omap4 is present in system control module)
--- drivers/usb/otg/Kconfig | 12 ++ drivers/usb/otg/Makefile | 1 drivers/usb/otg/omap4-usb-phy.c | 167 ++++++++++++++++++++++++++++++++++++++ include/linux/usb/omap4_usb_phy.h | 53 ++++++++++++ 4 files changed, 233 insertions(+)
drivers/usb/otg/Kconfig +12 -0
@@ -78,6 +78,18 @@ config TWL6030_USB are hooked to this driver through platform_data structure. The definition of internal PHY APIs are in the mach-omap2 layer. +config OMAP4_USB_PHY + tristate "Texas Instruments OMAP4+ USB pin control driver" + help + If you say yes here you get support for the Texas Instruments + OMAP4+ USB pin control driver. The register set is part of system + control module. + + USB phy in OMAP configures control module register for powering on + the phy, configuring VBUSVALID, AVALID, IDDIG and SESSEND. For + performing the above mentioned configuration, API's are added in + by this children of the control module driver. + config NOP_USB_XCEIV tristate "NOP USB Transceiver Driver" select USB_OTG_UTILS
drivers/usb/otg/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_USB_GPIO_VBUS) += gpio_vbus obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o obj-$(CONFIG_TWL4030_USB) += twl4030-usb.o obj-$(CONFIG_TWL6030_USB) += twl6030-usb.o +obj-$(CONFIG_OMAP4_USB_PHY) += omap4-usb-phy.o obj-$(CONFIG_NOP_USB_XCEIV) += nop-usb-xceiv.o obj-$(CONFIG_USB_ULPI) += ulpi.o obj-$(CONFIG_USB_ULPI_VIEWPORT) += ulpi_viewport.o
drivers/usb/otg/omap4-usb-phy.c new file +167 -0
167 lines not on this page · raw message
include/linux/usb/omap4_usb_phy.h new file +53 -0
53 lines not on this page · raw message
RFC PATCH v2 6/11 ARM: OMAP4+: Adding the temperature sensor register set bit fields
In reply to Eduardo ValentinOMAP4460 specific temperature sensor register bit fields are added. Existing OMAP4 entries are renamed to OMAP4430.
--- arch/arm/mach-omap2/include/mach/control.h | 116 ++++++++++++++++++++++++++++ 1 files changed, 116 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/include/mach/control.h +116 -0
@@ -230,6 +230,122 @@/* OMAP44xx control McBSP padconf */ #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MCBSPLP 0x061c +/* TEMP_SENSOR OMAP4430 */ +#define OMAP4430_BGAP_TEMPSOFF_SHIFT 12 +#define OMAP4430_BGAP_TEMPSOFF_MASK (1 << 12) +#define OMAP4430_BGAP_TSHUT_SHIFT 11 +#define OMAP4430_BGAP_TSHUT_MASK (1 << 11) +#define OMAP4430_BGAP_TEMP_SENSOR_CONTCONV_SHIFT 10 +#define OMAP4430_BGAP_TEMP_SENSOR_CONTCONV_MASK (1 << 10) +#define OMAP4430_BGAP_TEMP_SENSOR_SOC_SHIFT 9 +#define OMAP4430_BGAP_TEMP_SENSOR_SOC_MASK (1 << 9) +#define OMAP4430_BGAP_TEMP_SENSOR_EOCZ_SHIFT 8 +#define OMAP4430_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 8) +#define OMAP4430_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0 +#define OMAP4430_BGAP_TEMP_SENSOR_DTEMP_MASK (0xff << 0) + +/* TEMP_SENSOR OMAP4460 */ +#define OMAP4460_BGAP_TEMPSOFF_SHIFT 13 +#define OMAP4460_BGAP_TEMPSOFF_MASK (1 << 13) +#define OMAP4460_BGAP_TEMP_SENSOR_SOC_SHIFT 11 +#define OMAP4460_BGAP_TEMP_SENSOR_SOC_MASK (1 << 11) +#define OMAP4460_BGAP_TEMP_SENSOR_EOCZ_SHIFT 10 +#define OMAP4460_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 10) +#define OMAP4460_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0 +#define OMAP4460_BGAP_TEMP_SENSOR_DTEMP_MASK (0x3ff << 0) + +/* BANDGAP_CTRL */ +#define OMAP4460_SINGLE_MODE_SHIFT 31 +#define OMAP4460_SINGLE_MODE_MASK (1 << 31) +#define OMAP4460_MASK_HOT_SHIFT 1 +#define OMAP4460_MASK_HOT_MASK (1 << 1) +#define OMAP4460_MASK_COLD_SHIFT 0 +#define OMAP4460_MASK_COLD_MASK (1 << 0) + +/* BANDGAP_COUNTER */ +#define OMAP4460_COUNTER_SHIFT 0 +#define OMAP4460_COUNTER_MASK (0xffffff << 0) + +/* BANDGAP_THRESHOLD */ +#define OMAP4460_T_HOT_SHIFT 16 +#define OMAP4460_T_HOT_MASK (0x3ff << 16) +#define OMAP4460_T_COLD_SHIFT 0 +#define OMAP4460_T_COLD_MASK (0x3ff << 0) + +/* TSHUT_THRESHOLD */ +#define OMAP4460_TSHUT_HOT_SHIFT 16 +#define OMAP4460_TSHUT_HOT_MASK (0x3ff << 16) +#define OMAP4460_TSHUT_COLD_SHIFT 0 +#define OMAP4460_TSHUT_COLD_MASK (0x3ff << 0) + +/* BANDGAP_STATUS */ +#define OMAP4460_CLEAN_STOP_SHIFT 3 +#define OMAP4460_CLEAN_STOP_MASK (1 << 3) +#define OMAP4460_BGAP_ALERT_SHIFT 2 +#define OMAP4460_BGAP_ALERT_MASK (1 << 2) +#define OMAP4460_HOT_FLAG_SHIFT 1 +#define OMAP4460_HOT_FLAG_MASK (1 << 1) +#define OMAP4460_COLD_FLAG_SHIFT 0 +#define OMAP4460_COLD_FLAG_MASK (1 << 0) + +/* TEMP_SENSOR OMAP5430 */ +#define OMAP5430_BGAP_TEMP_SENSOR_SOC_SHIFT 12 +#define OMAP5430_BGAP_TEMP_SENSOR_SOC_MASK (1 << 12) +#define OMAP5430_BGAP_TEMPSOFF_SHIFT 11 +#define OMAP5430_BGAP_TEMPSOFF_MASK (1 << 11) +#define OMAP5430_BGAP_TEMP_SENSOR_EOCZ_SHIFT 10 +#define OMAP5430_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 10) +#define OMAP5430_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0 +#define OMAP5430_BGAP_TEMP_SENSOR_DTEMP_MASK (0x3ff << 0) + +/* BANDGAP_CTRL */ +#define OMAP5430_MASK_HOT_CORE_SHIFT 5 +#define OMAP5430_MASK_HOT_CORE_MASK (1 << 5) +#define OMAP5430_MASK_COLD_CORE_SHIFT 4 +#define OMAP5430_MASK_COLD_CORE_MASK (1 << 4) +#define OMAP5430_MASK_HOT_MM_SHIFT 3 +#define OMAP5430_MASK_HOT_MM_MASK (1 << 3) +#define OMAP5430_MASK_COLD_MM_SHIFT 2 +#define OMAP5430_MASK_COLD_MM_MASK (1 << 2) +#define OMAP5430_MASK_HOT_MPU_SHIFT 1 +#define OMAP5430_MASK_HOT_MPU_MASK (1 << 1) +#define OMAP5430_MASK_COLD_MPU_SHIFT 0 +#define OMAP5430_MASK_COLD_MPU_MASK (1 << 0) + +/* BANDGAP_COUNTER */ +#define OMAP5430_REPEAT_MODE_SHIFT 31 +#define OMAP5430_REPEAT_MODE_MASK (1 << 31) +#define OMAP5430_COUNTER_SHIFT 0 +#define OMAP5430_COUNTER_MASK (0xffffff << 0) + +/* BANDGAP_THRESHOLD */ +#define OMAP5430_T_HOT_SHIFT 16 +#define OMAP5430_T_HOT_MASK (0x3ff << 16) +#define OMAP5430_T_COLD_SHIFT 0 +#define OMAP5430_T_COLD_MASK (0x3ff << 0) + +/* TSHUT_THRESHOLD */ +#define OMAP5430_TSHUT_HOT_SHIFT 16 +#define OMAP5430_TSHUT_HOT_MASK (0x3ff << 16) +#define OMAP5430_TSHUT_COLD_SHIFT 0 +#define OMAP5430_TSHUT_COLD_MASK (0x3ff << 0) + +/* BANDGAP_STATUS */ +#define OMAP5430_BGAP_ALERT_SHIFT 31 +#define OMAP5430_BGAP_ALERT_MASK (1 << 31) +#define OMAP5430_HOT_CORE_FLAG_SHIFT 5 +#define OMAP5430_HOT_CORE_FLAG_MASK (1 << 5) +#define OMAP5430_COLD_CORE_FLAG_SHIFT 4 +#define OMAP5430_COLD_CORE_FLAG_MASK (1 << 4) +#define OMAP5430_HOT_MM_FLAG_SHIFT 3 +#define OMAP5430_HOT_MM_FLAG_MASK (1 << 3) +#define OMAP5430_COLD_MM_FLAG_SHIFT 2 +#define OMAP5430_COLD_MM_FLAG_MASK (1 << 2) +#define OMAP5430_HOT_MPU_FLAG_SHIFT 1 +#define OMAP5430_HOT_MPU_FLAG_MASK (1 << 1) +#define OMAP5430_COLD_MPU_FLAG_SHIFT 0 +#define OMAP5430_COLD_MPU_FLAG_MASK (1 << 0) +/* AM35XX only CONTROL_GENERAL register offsets */ #define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038)#define AM35XX_CONTROL_DEVCONF2 (OMAP2_CONTROL_GENERAL + 0x0310)
Signature · 1 line
1.7.7.1.488.ge8e1c
Tony Lindgren
maintainerRFC PATCH v2 6/11 ARM: OMAP4+: Adding the temperature sensor register set bit fields
Quoted 48 lines · Konstantin Baydarov
OMAP4460 specific temperature sensor register bit fields are added. Existing OMAP4 entries are renamed to OMAP4430.
Signed-off-by Keerthy <[email protected]>Signed-off-by Eduardo Valentin <[email protected]>--- arch/arm/mach-omap2/include/mach/control.h | 116 ++++++++++++++++++++++++++++ 1 files changed, 116 insertions(+), 0 deletions(-)arch/arm/mach-omap2/include/mach/control.h +31
-0@@ -230,6 +230,122 @@/* OMAP44xx control McBSP padconf */ #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MCBSPLP 0x061c +/* TEMP_SENSOR OMAP4430 */ +#define OMAP4430_BGAP_TEMPSOFF_SHIFT 12 +#define OMAP4430_BGAP_TEMPSOFF_MASK (1 << 12) +#define OMAP4430_BGAP_TSHUT_SHIFT 11 +#define OMAP4430_BGAP_TSHUT_MASK (1 << 11) +#define OMAP4430_BGAP_TEMP_SENSOR_CONTCONV_SHIFT 10 +#define OMAP4430_BGAP_TEMP_SENSOR_CONTCONV_MASK (1 << 10) +#define OMAP4430_BGAP_TEMP_SENSOR_SOC_SHIFT 9 +#define OMAP4430_BGAP_TEMP_SENSOR_SOC_MASK (1 << 9) +#define OMAP4430_BGAP_TEMP_SENSOR_EOCZ_SHIFT 8 +#define OMAP4430_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 8) +#define OMAP4430_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0 +#define OMAP4430_BGAP_TEMP_SENSOR_DTEMP_MASK (0xff << 0) + +/* TEMP_SENSOR OMAP4460 */ +#define OMAP4460_BGAP_TEMPSOFF_SHIFT 13 +#define OMAP4460_BGAP_TEMPSOFF_MASK (1 << 13) +#define OMAP4460_BGAP_TEMP_SENSOR_SOC_SHIFT 11 +#define OMAP4460_BGAP_TEMP_SENSOR_SOC_MASK (1 << 11) +#define OMAP4460_BGAP_TEMP_SENSOR_EOCZ_SHIFT 10 +#define OMAP4460_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 10) +#define OMAP4460_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0 +#define OMAP4460_BGAP_TEMP_SENSOR_DTEMP_MASK (0x3ff << 0) + +/* BANDGAP_CTRL */ +#define OMAP4460_SINGLE_MODE_SHIFT 31 +#define OMAP4460_SINGLE_MODE_MASK (1 << 31) +#define OMAP4460_MASK_HOT_SHIFT 1 +#define OMAP4460_MASK_HOT_MASK (1 << 1) +#define OMAP4460_MASK_COLD_SHIFT 0 +#define OMAP4460_MASK_COLD_MASK (1 << 0)
arch/arm/mach-omap2/include/mach/control.h line 273
Quoted 10 lines
arch/arm/mach-omap2/include/mach/control.h +10
-0+ +/* BANDGAP_COUNTER */ +#define OMAP4460_COUNTER_SHIFT 0 +#define OMAP4460_COUNTER_MASK (0xffffff << 0) + +/* BANDGAP_THRESHOLD */ +#define OMAP4460_T_HOT_SHIFT 16 +#define OMAP4460_T_HOT_MASK (0x3ff << 16) +#define OMAP4460_T_COLD_SHIFT 0 +#define OMAP4460_T_COLD_MASK (0x3ff << 0)
These should be all private to the bandgap driver. The same applies for other driver specific registers for other drivers.
Tony
RFC PATCH v2 7/11 ARM: OMAP4+: thermal: introduce bandgap temperature sensor
In reply to Eduardo ValentinIn the System Control Module, OMAP supplies a voltage reference and a temperature sensor feature that are gathered in the band gap voltage and temperature sensor (VBGAPTS) module. The band gap provides current and voltage reference for its internal circuits and other analog IP blocks. The analog-to-digital converter (ADC) produces an output value that is proportional to the silicon temperature.
This patch provides a platform driver which expose this feature. It is moduled as a MFD child of the System Control Module core MFD driver.
This driver provides only APIs to access the device properties, like temperature, thresholds and update rate.
Changes since previous version:
- Bandgap and usb phy: drivers are now independent from control module driver, they use their own API functions.
- Bandgap and usb phy: Added private spinlocks for bandgap and usb drivers.
- Bandgap: Check the type of bandgap dynamically in bandgap driver probe function by reading omap core control module revision register CONTROL_GEN_CORE_REVISION.
--- Documentation/devicetree/bindings/thermal/omap_bandgap.txt | 27 drivers/thermal/Kconfig | 12 drivers/thermal/Makefile | 4 drivers/thermal/omap-bandgap.c | 1654 +++++++++++++ drivers/thermal/omap-bandgap.h | 64 5 files changed, 1760 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/thermal/omap_bandgap.txt new file +27 -0
@@ -0,0 +1,27 @@ +* Texas Instrument OMAP SCM bandgap bindings + +In the System Control Module, OMAP supplies a voltage reference +and a temperature sensor feature that are gathered in the band +gap voltage and temperature sensor (VBGAPTS) module. The band +gap provides current and voltage reference for its internal +circuits and other analog IP blocks. The analog-to-digital +converter (ADC) produces an output value that is proportional +to the silicon temperature. + +Required properties: +- compatible : Should be: + - "ti,omap4460-control-bandgap" : for OMAP4460 bandgap + - "ti,omap5430-control-bandgap" : for OMAP5430 bandgap +- interrupts : this entry should indicate which interrupt line +the talert signal is routed to; +Specific: +- ti,tshut-gpio : this entry should be used to inform which GPIO +line the tshut signal is routed to; + +Example: + +bandgap { + compatible = "ti,omap4460-control-bandgap"; + interrupts = <0 126 4>; /* talert */ + ti,tshut-gpio = <86>; +};
drivers/thermal/Kconfig +12 -0
@@ -26,3 +26,15 @@ config SPEAR_THERMAL help Enable this to plug the SPEAr thermal sensor driver into the Linux thermal framework + +config OMAP_BANDGAP + tristate "Texas Instruments OMAP4+ temperature sensor driver" + depends on THERMAL + help + If you say yes here you get support for the Texas Instruments + OMAP4460+ on die bandgap temperature sensor support. The register + set is part of system control module. + + This includes alert interrupts generation and also the TSHUT + support. +
drivers/thermal/Makefile +3 -1
@@ -3,4 +3,6 @@ # obj-$(CONFIG_THERMAL) += thermal_sys.o -obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o +obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o +obj-$(CONFIG_OMAP_BANDGAP) += omap-thermal.o +omap-thermal-y := omap-bandgap.o
drivers/thermal/omap-bandgap.c new file +1654 -0
1,654 lines not on this page · raw message
drivers/thermal/omap-bandgap.h new file +64 -0
64 lines not on this page · raw message
RFC PATCH v2 8/11 omap4: thermal: add basic CPU thermal zone
In reply to Eduardo ValentinThis patch exposes OMAP4 thermal sensor as a thermal zone named "cpu". Only thermal creation is done here.
TODO:
- Add cooling bindings
- Add extrapolation rules
--- drivers/thermal/Kconfig | 12 ++++++ drivers/thermal/Makefile | 1 drivers/thermal/omap-bandgap.c | 1 drivers/thermal/omap-bandgap.h | 12 ++++++ drivers/thermal/omap4-thermal.c | 72 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+)
drivers/thermal/Kconfig +12 -0
@@ -38,3 +38,15 @@ config OMAP_BANDGAP This includes alert interrupts generation and also the TSHUT support. +config OMAP4_THERMAL + bool "Texas Instruments OMAP4 thermal support" + depends on OMAP_BANDGAP + depends on ARCH_OMAP4 + help + If you say yes here you get thermal support for the Texas Instruments + OMAP4 SoC family. The current chip supported are: + - OMAP4460 + + This includes alert interrupts generation and also the TSHUT + support. +
drivers/thermal/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-$(CONFIG_THERMAL) += thermal_sys.o obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o obj-$(CONFIG_OMAP_BANDGAP) += omap-thermal.o omap-thermal-y := omap-bandgap.o +omap-thermal-$(CONFIG_OMAP4_THERMAL) += omap4-thermal.o
drivers/thermal/omap-bandgap.c +1 -0
@@ -1213,6 +1213,7 @@ static const struct omap_bandgap_data om .fclock_name = "bandgap_ts_fclk", .div_ck_name = "div_ts_ck", .conv_table = omap4460_adc_to_temp, + .expose_sensor = omap4_thermal_expose_sensor, .irq = 126, .sensors = { {
drivers/thermal/omap-bandgap.h +12 -0
@@ -61,4 +61,16 @@ int omap_bandgap_write_update_interval(sint omap_bandgap_read_temperature (struct omap_bandgap *bg_ptr,int id,int *temperature); +#ifdef CONFIG_OMAP4_THERMAL +int omap4_thermal_expose_sensor (struct omap_bandgap *bg_ptr,int id, +char *domain); +#else +static inline int omap4_thermal_expose_sensor (struct omap_bandgap *bg_ptr, +int id,char *domain) +{ +return 0 ; +} + +#endif +#endif
drivers/thermal/omap4-thermal.c new file +72 -0
72 lines not on this page · raw message
RFC PATCH v2 9/11 ARM: DT: Add support to system control module for OMAP4
In reply to Eduardo ValentinThis patch adds device tree entries on OMAP4 based boards for System Control Module (SCM).
TODO:
The IOMEM windows of ctrl_module_core, bandgap, usbphy overlap, so probably only specific registers should be specified in dts for bandgap and usb phy entries.
--- arch/arm/boot/dts/omap4.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/boot/dts/omap4.dtsi +17 -0
@@ -272,5 +272,22 @@ ti,hwmods = "mmc5"; ti,needs-special-reset; }; + + ctrl_module_core: ctrl_module_core at 4a002000 { + compatible = "ti,omap4-control"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + ti,hwmods = "ctrl_module_core"; + reg = <0x4a002000 0x1000>; + bandgap at 4a002000 { + compatible = "ti,omap4-bandgap"; + reg = <0x4a002000 0x1000>; + }; + usb at 4a002000 { + compatible = "ti,omap4-usb-phy"; + reg = <0x4a002000 0x1000>; + }; + }; }; };
RFC PATCH v2 9/11 ARM: DT: Add support to system control module for OMAP4
Hello.
Quoted 27 lines · Konstantin Baydarov
This patch adds device tree entries on OMAP4 based boards for System Control Module (SCM).
TODO:
The IOMEM windows ofctrl_module_core, bandgap, usbphy overlap, so probably only specific registers should be specified in dts for bandgap and usb phy entries.Signed-off-by Konstantin Baydarov<[email protected]>Signed-off-by Eduardo Valentin<[email protected]>--- arch/arm/boot/dts/omap4.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)Index:
linux-2.6/arch/arm/boot/dts/omap4.dtsi
===================================================================arch/arm/boot/dts/omap4.dtsi +5
-0@@ -272,5 +272,22 @@ ti,hwmods = "mmc5"; ti,needs-special-reset; }; + + ctrl_module_core: ctrl_module_core at 4a002000 { + compatible = "ti,omap4-control"; + #address-cells =<1>; + #size-cells =<1>;
arch/arm/boot/dts/omap4.dtsi line 289
Quoted 10 lines
arch/arm/boot/dts/omap4.dtsi +10
-0+ ranges; + ti,hwmods = "ctrl_module_core"; + reg =<0x4a002000 0x1000>; + bandgap at 4a002000 { + compatible = "ti,omap4-bandgap"; + reg =<0x4a002000 0x1000>; + }; + usb at 4a002000 { + compatible = "ti,omap4-usb-phy"; + reg =<0x4a002000 0x1000>;
Two devices at the same address? Also, shouldn't values in the "reg"
property be relative to the value in the parent's "reg" property? Are they needed at all here?
WBR, Sergei