2015-09-25 01:57:06 +08:00
|
|
|
# Kconfig - Pinmux configuration options
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright (c) 2015 Intel Corporation
|
|
|
|
#
|
2015-10-07 00:00:37 +08:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
2015-09-25 01:57:06 +08:00
|
|
|
#
|
2015-10-07 00:00:37 +08:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2015-09-25 01:57:06 +08:00
|
|
|
#
|
2015-10-07 00:00:37 +08:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
2015-09-25 01:57:06 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# PinMux options
|
|
|
|
#
|
|
|
|
menuconfig PINMUX
|
2016-08-18 07:33:08 +08:00
|
|
|
bool "Enable board pinmux driver"
|
2016-05-25 07:17:13 +08:00
|
|
|
default n
|
2015-09-25 01:57:06 +08:00
|
|
|
|
2016-03-22 16:59:39 +08:00
|
|
|
if PINMUX
|
|
|
|
|
2016-03-16 02:43:38 +08:00
|
|
|
source "drivers/pinmux/dev/Kconfig"
|
|
|
|
|
2016-05-20 21:26:22 +08:00
|
|
|
config PINMUX_NAME
|
2016-06-02 02:46:14 +08:00
|
|
|
string "Pinmux driver name"
|
|
|
|
depends on PINMUX
|
|
|
|
default "PINMUX"
|
|
|
|
help
|
|
|
|
The name of the pinmux driver.
|
2016-05-20 21:26:22 +08:00
|
|
|
|
2015-10-27 03:56:02 +08:00
|
|
|
config PINMUX_INIT_PRIORITY
|
|
|
|
int
|
|
|
|
prompt "Init priority"
|
pinmux: Make default init priority be between GPIO's prio and device prio.
Pinmux driver almost certainly should be initialized before the
rest of hardware devices (which may need specific pins already
configured for them), and usually after generic GPIO drivers.
Thus, its priority should be between KERNEL_INIT_PRIORITY_DEFAULT
(default 40) and KERNEL_INIT_PRIORITY_DEVICE (default 50). Thus,
we set PINMUX_INIT_PRIORITY to 45.
There are exceptions to the rule above for particular boards. For
example, BOARD=galileo has GPIO and pinmuxer on I2C bus and thus
overrides PINMUX_INIT_PRIORITY to be much higher. Note that while
PINMUX_INIT_PRIORITY was defined previously (at 60), it was used
only for galileo, which overrides it anyway.
This fix was prompted by investigation why eth_ksdk driver was
non-functional after kernel priorities re-hashing: both eth_ksdk
and pinmux used the same priority, and eth_ksdk happened to run
before pinmux. While bumping eth_ksdk priority would help in the
particular case, the same would likely reoccur with other drivers
like I2C, SPI, etc.
Change-Id: Ie5ca3135c1ee2fe8d9cf48d5c12e62eac63487f7
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-11-11 23:13:59 +08:00
|
|
|
default 45
|
2015-10-27 03:56:02 +08:00
|
|
|
depends on PINMUX
|
|
|
|
help
|
pinmux: Make default init priority be between GPIO's prio and device prio.
Pinmux driver almost certainly should be initialized before the
rest of hardware devices (which may need specific pins already
configured for them), and usually after generic GPIO drivers.
Thus, its priority should be between KERNEL_INIT_PRIORITY_DEFAULT
(default 40) and KERNEL_INIT_PRIORITY_DEVICE (default 50). Thus,
we set PINMUX_INIT_PRIORITY to 45.
There are exceptions to the rule above for particular boards. For
example, BOARD=galileo has GPIO and pinmuxer on I2C bus and thus
overrides PINMUX_INIT_PRIORITY to be much higher. Note that while
PINMUX_INIT_PRIORITY was defined previously (at 60), it was used
only for galileo, which overrides it anyway.
This fix was prompted by investigation why eth_ksdk driver was
non-functional after kernel priorities re-hashing: both eth_ksdk
and pinmux used the same priority, and eth_ksdk happened to run
before pinmux. While bumping eth_ksdk priority would help in the
particular case, the same would likely reoccur with other drivers
like I2C, SPI, etc.
Change-Id: Ie5ca3135c1ee2fe8d9cf48d5c12e62eac63487f7
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-11-11 23:13:59 +08:00
|
|
|
Pinmux driver initialization priority.
|
|
|
|
Pinmux driver almost certainly should be initialized before the
|
|
|
|
rest of hardware devices (which may need specific pins already
|
|
|
|
configured for them), and usually after generic GPIO drivers.
|
|
|
|
Thus, its priority should be between KERNEL_INIT_PRIORITY_DEFAULT
|
|
|
|
and KERNEL_INIT_PRIORITY_DEVICE. There are exceptions to this
|
|
|
|
rule for particular boards. Don't change this value unless you
|
|
|
|
know what you are doing.
|
2015-10-27 03:56:02 +08:00
|
|
|
|
2016-10-17 03:33:27 +08:00
|
|
|
config PINMUX_K64
|
|
|
|
bool "Freescale K64-based Pin multiplexer driver"
|
|
|
|
depends on SOC_MK64F12
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable driver for Freescale K64-based Pin multiplexer.
|
arm: Freescale K64/FRDM-K64F Pinmux support
K64 pinmux support is created as a normal driver.
As opposed to the Galileo board, the pin configuration options are
defined by the MCU and are not board-specific. Separate
platform/board-specific configuration code uses the pinmux driver for
the default pin settings. For FRDM-K64F, only the Arduino pins (22 of a
possible 160) are set up.
Some of the I/O pins routed to the Arduino header are also configured as
JTAG/SWD signals by default and are used by the OpenSDAv2 debug
interface. Therefore, a PRESERVE_JTAG_IO_PINS config option was created
for the FRDM-K64 platform to prevent the default pin settings from
re-configuring these pins.
The K64 MCU separates pin configuration and control, implemented in the
pinmux driver, from GPIO. This results in some cross referencing
between the K64 GPIO driver and the K64 pinmux driver due to the
dependencies of one on the other.
This pinmux driver also uses the expanded pinmux function/mode parameter
size to describe pin configuration options with bit fields for the K64,
including up to 8 pin functions, plus interrupt, pullup/down, drive
strength, open-drain and slew rate.
The following GCC warnings in the K64 pinmux driver are prevented when not
compiling with 'no-optimization' (-O0):
warning: 'gpio_dev' may be used uninitialized in this function
[-Wmaybe-uninitialized]
Change-Id: Ie5031d18750143bf895883058b3cd55fd9989fd3
Signed-off-by: Jeff Blais <jeff.blais@windriver.com>
2016-02-02 06:30:48 +08:00
|
|
|
|
2016-03-03 22:33:15 +08:00
|
|
|
source "drivers/pinmux/Kconfig.stm32"
|
2016-03-22 16:59:39 +08:00
|
|
|
|
2016-09-08 17:54:21 +08:00
|
|
|
source "drivers/pinmux/Kconfig.beetle"
|
|
|
|
|
2016-03-22 16:59:39 +08:00
|
|
|
endif # PINMUX
|