Commit graph

80 commits

Author SHA1 Message Date
Francisco Munoz 20748fbb1b soc: microchip: mec1501: Add PS/2 support in Kconfig
Turn on PS/2 XEC Kconfig in terms of a generic Kconfig

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-09-18 13:23:52 +08:00
Francisco Munoz cb833ff18f soc: microchip: mec1501: Add dts fixup for PS/2 instances
Introduce DT fix up for autogenerated PS/2 definitions

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-09-18 13:23:52 +08:00
Tomasz Bursztyka 403e6f1b99 soc/arm: Add a fixup for counter/alarm sample to compile with MEC1501
There are 2 other timers that could be selected, let's just take the
first 32bits one. This should be sufficient to verify the driver.

Enabling the timer in relevant board's dts file as well.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-14 12:13:49 +08:00
Tomasz Bursztyka c6fe94a6f1 soc/arm: Enable XEC counter driver relevantly for MEC1501
Enabling XEC counter driver when CONFIG_COUNTER is set.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-14 12:13:49 +08:00
Tomasz Bursztyka 41c93a589c driver/counter: Add support for Microchip's XEC basic timer devices
Such basic timer is found on MEC150x for instance.
Since instances have dedicated data, let's define specifice instance
based on unique DT base address definition.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-14 12:13:49 +08:00
Scott Worley 6be78f36df soc : arm : microchip_mec Move custom busy wait config to MEC1501 SoC
Configuration item custom busy wait is required for all MEC1501
series if its RTOS timer driver is enabled. We moved the selection
of the timer from board level to MEC1501 SoC level.
Frequency selection remains at the board level.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2019-09-13 09:55:59 +02:00
Tomasz Bursztyka 0d37373196 soc/arm: Add the watchdog DTS fixup for mec1501
This is required to get the watchdog test and sample working since the
required wdt device name macro is generic there.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-07 09:56:58 -04:00
Kumar Gala 47250b50a2 soc: microchip_mec: mec1501: Fixup GPIO dts defines
Use address based defines in the dts_fixup.h instead of DT_INST_ based
ones.  The DT_INST_ will not get us the consistent mapping that is
needed (as we should assume the order of DT_INST_).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 13:54:49 -05:00
Jose Alberto Meza e98ea27cc1 soc: mchp: Perform OTP override for 32KHz internal oscillator
Perform OTP override when selecting 32Khz internal oscillator
to ensure 32KHz is enabled.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-08-08 16:41:30 -07:00
Jose Alberto Meza 1978022ff8 soc: mchp: Add configuration option to switch timer drivers
Expose in MEC1501 SoC and option to switch between OS timer drivers

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-08-06 15:13:45 -07:00
Scott Worley 58e9a93faf soc : arm : microchip_mec Fix MEC1501 SoC ECIA initialization
Changes to MEC1501 HAL for eSPI changed loop constant used by SoC
code initializing the ECIA registers. Fixed by using HAL constants
that are invariant.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2019-08-01 21:58:54 +03:00
Kumar Gala 9c8c33128b mec1701: fix dts build error
This file wasn't migrated to the new DTS define for the
IRQ priority.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-25 08:32:33 -04:00
Scott Worley bdaab8cfa0 drivers : timer : Add MEC1501 32KHz kernel timer driver
Add a kernel timer driver for the MEC1501 32KHz RTOS timer.
This timer is a count down 32-bit counter clocked at a fixed
32768 Hz. It features one-shot, auto-reload, and halt count down
while the Cortex-M is halted by JTAG/SWD. This driver is based
on the new Intel local APIC driver. The driver was tuned for
accuracy at small sleep values. Added a work-around for RTOS
timer restart issue. RTOS timer driver requires board ticks per
second to be 32768 if tickless operation is configured.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2019-07-24 14:58:41 -07:00
Andrew Boie 0a56e856c1 mec1501: fix dts build error
This file wasn't migrated to the new DTS define for the
IRQ priority.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-24 13:32:12 -07:00
Kumar Gala 3c8f8cb256 dts/arm/microchip: Mark uart & i2c nodes as disabled by default
Have the SoC dtsi files for microchip mark the devices (uart & i2c) as
disabled by default and let the board dts files enable which one's they
need/use (which is what's happening already).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-20 17:21:01 -04:00
Kumar Gala a2693975d7 dts: Convert from DT_<COMPAT>_<INSTANCE>_<PROP> to DT_INST...
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-14 08:02:15 -05:00
Francisco Munoz 950679470d soc: microchip_mec: mec1501 Add pinmux definitions
Define pinmux base addresses from gpio bases. Pinmux
and gpio functionality are located in the same PCR register
for each pin.

Introduce pinmux Kconfig switches for the SOC.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-05-27 09:24:08 -04:00
Ioannis Glaropoulos fb713aa062 soc: arm: move z_clearfaults() in kernel_arch_init()
In kernel_arch_init() we initialize the ARM core (interrupt
setup, fault init, etc.) so we can also move z_clearfaults()
in the same function and skip invoking it in the SoC init
functions.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-17 09:48:11 -07:00
Francisco Munoz 35cfe113d2 soc : microchip_mec : Add gpio driver common definitions
Macros and enums are included for supporting pin configuration
settings.

Entries to the dts_fixup were also included in order
to configure port level settings.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-05-08 16:39:54 -07:00
Jose Alberto Meza 467d1c3205 soc: arm: mchp: Add I2C to device tree for MEC1501
Add additional support to device tree for I2C

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-05-08 15:02:26 -07:00
Scott Worley 37df256658 soc : arm : microchip_mec Add Microchip MEC1501 SoC
Initial support for Microchip MEC1501 series is added to the tree.
Additional support for UART is also included. This SoC supports
two operational modes for interrupts (Direct and Aggregated). For
this commit, the direct capable interrupt are configured in direct
mode.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2019-04-30 14:08:23 -07:00
Ioannis Glaropoulos ccf90fd9c2 soc: arm: select CPU_HAS_SYSTICK in ARCH Kconfig
ARM SysTick timer is implemented by default in ARMv7-M
and Mainline ARMv8-M processors, so we include the
corresponding Kconfig symbol in arch/arm/core/cortex-M/Kconfig
and remove the selections from the Cortex-M SOCs.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-25 23:09:23 -07:00
Ioannis Glaropoulos ce0dcea4b1 soc: arm: remove redundant CPU_CORTEX_M selection
CPU_CORTEX_M does not need to be selected by Kconfig
symbols that already select a CORTEX_M variant.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-25 23:09:23 -07:00
Ulf Magnusson 7fdb525754 kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.

Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.

Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):

For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-18 12:20:49 -04:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Ulf Magnusson c5592de5ae uart/ns16550: Give CONFIG_NS16550_REG_SHIFT a DT_* prefix instead
This value always comes from DTS. No Kconfig symbol named
NS16550_REG_SHIFT ever existed.

Might've been missed in commit 603f068690 ("uart/ns16550: Use DT_ prefix
for remaining device configs").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-03 23:43:27 -05:00
Daniel Leung 603f068690 uart/ns16550: Use DT_ prefix for remaining device configs
Previous rename from CONFIG_* to DT_* left a few remaining
CONFIG_*. So rename them manually now.

Fix #13753

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-26 20:06:26 -06:00
Piotr Zięcik 240783a229 soc: Cleanup SYS_POWER_*_SUPPORTED Kconfig options
This commit removes "select SYS_POWER_*_SUPPORTED" entries from
Kconfig on SoCs which are not implementing sys_set_power_state()
method used to control power mode.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-19 13:25:36 -05:00
Piotr Zięcik 7a49356c77 power: Fix naming of Kconfig options controlling low power states
The SYS_POWER_LOW_POWER_STATE_SUPPORTED and SYS_POWER_LOW_POWER_STATE
suggests one low power state but these options control multiple
low power state. This commit uses plural in the names to indicate
that.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-12 07:46:32 -05:00
Francisco Munoz f416327827 arch: arm: Add Microchip MEC1701 SoC
Initial support for Microchip MEC1701 series is incorporated to the
tree. Additional support for UART is also included. This SOC supports
two operation modes for interrupts (Direct and Aggregated). For this
commit, the interrupts are configured in direct mode.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-02-08 21:38:54 -05:00