boards/x86: Use dts for configuring the cc2520 device
Only the SPI bus for now. Make cc2520's Kconfig aware of DTS on these settings. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
f95c3d1a00
commit
1b3b0153a6
4 changed files with 22 additions and 13 deletions
|
@ -16,19 +16,8 @@ config SPI
|
|||
config GPIO
|
||||
default y
|
||||
|
||||
config IEEE802154_CC2520_SPI_DRV_NAME
|
||||
default SPI_1_NAME
|
||||
config IEEE802154_CC2520_SPI_FREQ
|
||||
default 8000000
|
||||
config IEEE802154_CC2520_SPI_SLAVE
|
||||
default 1
|
||||
|
||||
config IEEE802154_CC2520_GPIO_SPI_CS
|
||||
default y
|
||||
config IEEE802154_CC2520_GPIO_SPI_CS_DRV_NAME
|
||||
default "GPIO_0"
|
||||
config IEEE802154_CC2520_GPIO_SPI_CS_PIN
|
||||
default 11
|
||||
|
||||
config IEEE802154_CC2520_GPIO_0_NAME
|
||||
string
|
||||
|
|
16
boards/x86/quark_se_c1000_devboard/dts_fixup.h
Normal file
16
boards/x86/quark_se_c1000_devboard/dts_fixup.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* This file is a temporary workaround for mapping of the generated information
|
||||
* to the current driver definitions. This will be removed when the drivers
|
||||
* are modified to handle the generated information, or the mapping of
|
||||
* generated data matches the driver definitions.
|
||||
*/
|
||||
|
||||
#define CONFIG_IEEE802154_CC2520_SPI_DRV_NAME DT_SNPS_DESIGNWARE_SPI_B0001400_TI_CC2520_0_BUS_NAME
|
||||
#define CONFIG_IEEE802154_CC2520_SPI_SLAVE DT_SNPS_DESIGNWARE_SPI_B0001400_TI_CC2520_0_BASE_ADDRESS
|
||||
#define CONFIG_IEEE802154_CC2520_SPI_FREQ DT_SNPS_DESIGNWARE_SPI_B0001400_TI_CC2520_0_SPI_MAX_FREQUENCY
|
||||
#define CONFIG_IEEE802154_CC2520_GPIO_SPI_CS_DRV_NAME DT_SNPS_DESIGNWARE_SPI_B0001400_CS_GPIOS_CONTROLLER
|
||||
#define CONFIG_IEEE802154_CC2520_GPIO_SPI_CS_PIN DT_SNPS_DESIGNWARE_SPI_B0001400_CS_GPIOS_PIN
|
|
@ -78,4 +78,5 @@
|
|||
|
||||
&spi1 {
|
||||
status = "ok";
|
||||
|
||||
};
|
||||
|
|
|
@ -20,12 +20,14 @@ config IEEE802154_CC2520_DRV_NAME
|
|||
|
||||
config IEEE802154_CC2520_SPI_DRV_NAME
|
||||
string "SPI driver's name to use to access CC2520"
|
||||
depends on !HAS_DTS_SPI
|
||||
help
|
||||
This option is mandatory to set which SPI controller to use in order
|
||||
to actually control the CC2520 chip.
|
||||
|
||||
config IEEE802154_CC2520_SPI_FREQ
|
||||
int "SPI system frequency"
|
||||
depends on !HAS_DTS_SPI
|
||||
default 0
|
||||
help
|
||||
This option sets the SPI controller's frequency. Beware this value
|
||||
|
@ -34,6 +36,7 @@ config IEEE802154_CC2520_SPI_FREQ
|
|||
|
||||
config IEEE802154_CC2520_SPI_SLAVE
|
||||
int "SPI slave linked to CC2520"
|
||||
depends on !HAS_DTS_SPI
|
||||
default 0
|
||||
help
|
||||
This option sets the SPI slave number SPI controller has to switch
|
||||
|
@ -47,7 +50,7 @@ config IEEE802154_CC2520_GPIO_SPI_CS
|
|||
|
||||
config IEEE802154_CC2520_GPIO_SPI_CS_DRV_NAME
|
||||
string "GPIO driver's name to use to drive SPI CS through"
|
||||
depends on IEEE802154_CC2520_GPIO_SPI_CS
|
||||
depends on IEEE802154_CC2520_GPIO_SPI_CS && !HAS_DTS_SPI
|
||||
help
|
||||
This option is mandatory to set which GPIO controller to use in order
|
||||
to actually emulate the SPI CS.
|
||||
|
@ -55,7 +58,7 @@ config IEEE802154_CC2520_GPIO_SPI_CS_DRV_NAME
|
|||
config IEEE802154_CC2520_GPIO_SPI_CS_PIN
|
||||
int "GPIO PIN to use to drive SPI CS through"
|
||||
default 0
|
||||
depends on IEEE802154_CC2520_GPIO_SPI_CS
|
||||
depends on IEEE802154_CC2520_GPIO_SPI_CS && !HAS_DTS_SPI
|
||||
help
|
||||
This option is mandatory to set which GPIO pin to use in order
|
||||
to actually emulate the SPI CS.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue