#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

if ARCH_CHIP_BCM2711

comment "BCM2711 configuration options"

#####################################################################
# Peripheral selection
#####################################################################

menu "Broadcom BCM2711 Peripheral Selection"

config BCM2711_LOW_PERIPHERAL
	bool "BCM2711 Low Peripheral Mode"
	default y
	---help---
		Use the Broadcom BCM2711 in low peripheral addressing mode.

#####################################################################
# I2C Configuration (master)
#####################################################################

config BCM2711_I2C
	bool "I2C Master"
	select I2C
	---help---
		Support for I2C in master mode.

if BCM2711_I2C

config BCM2711_I2C0
	bool "I2C0"
	default n
	---help---
		Enable the I2C0 interface.
		See board selection menu to configure the pins used by I2C0.

config BCM2711_I2C1
	bool "I2C1"
	default n
	---help---
		Enable the I2C1 interface.
		See board selection menu to configure the pins used by I2C1.

config BCM2711_I2C2
	bool "I2C2"
	default n
	---help---
		Enable the I2C2 interface.
		See board selection menu to configure the pins used by I2C2.

config BCM2711_I2C3
	bool "I2C3"
	default n
	---help---
		Enable the I2C3 interface.
		See board selection menu to configure the pins used by I2C3.

config BCM2711_I2C4
	bool "I2C4"
	default n
	---help---
		Enable the I2C4 interface.
		See board selection menu to configure the pins used by I2C4.

config BCM2711_I2C5
	bool "I2C5"
	default n
	---help---
		Enable the I2C5 interface.
		See board selection menu to configure the pins used by I2C5.

config BCM2711_I2C6
	bool "I2C6"
	default n
	---help---
		Enable the I2C6 interface.
		See board selection menu to configure the pins used by I2C6.

config BCM2711_I2C_DRIVER
	bool "I2C character driver"
	default n
	select I2C_DRIVER
	---help---
		Support for the I2C character driver at /dev/i2c[N]. Can be used
		for I2C bus transfers from application code. This driver is intended
		for testing, not for use in any real driver application.

endif # BCM2711_I2C

#####################################################################
# SPI Configuration
#####################################################################

config BCM2711_SPI
	bool "SPI support"
	select SPI
	---help---
		Support for SPI interfaces.

if BCM2711_SPI

config BCM2711_SPI0
	bool "SPI0"
	depends on BCM2711_SPI
	default n
	---help---
		Enable the SPI0 interface.

if BCM2711_SPI0

config BCM2711_SPI0_CE0
	int "CE0 GPIO"
	depends on BCM2711_SPI0
	default 8
	---help---
		The GPIO pin for the chip enable 0 signal (8, 36, 43)

config BCM2711_SPI0_CE1
	int "CE1 GPIO"
	depends on BCM2711_SPI0
	default 7
	---help---
		The GPIO pin for the chip enable 1 signal (7, 35, 44)

config BCM2711_SPI0_MISO
	int "MISO GPIO"
	depends on BCM2711_SPI0
	default 9
	---help---
		The GPIO pin for the MISO signal (9, 37, 40)

config BCM2711_SPI0_MOSI
	int "MOSI GPIO"
	depends on BCM2711_SPI0
	default 10
	---help---
		The GPIO pin for the MOSI signal (10, 38, 41)

config BCM2711_SPI0_SCLK
	int "SCLK GPIO"
	depends on BCM2711_SPI0
	default 11
	---help---
		The GPIO pin for the SCLK signal (11, 39, 42)

endif

config BCM2711_SPI1
	bool "SPI1"
	depends on BCM2711_SPI
	default n
	---help---
		Enable the SPI1 interface (auxiliary).

config BCM2711_SPI2
	bool "SPI2"
	default n
	---help---
		Enable the SPI2 interface (auxiliary).

config BCM2711_SPI3
	bool "SPI3"
	depends on BCM2711_SPI
	default n
	---help---
		Enable the SPI3 interface.

config BCM2711_SPI4
	bool "SPI4"
	depends on BCM2711_SPI
	default n
	---help---
		Enable the SPI4 interface.

config BCM2711_SPI5
	bool "SPI5"
	depends on BCM2711_SPI
	default n
	---help---
		Enable the SPI5 interface.

config BCM2711_SPI6
	bool "SPI6"
	depends on BCM2711_SPI
	default n
	---help---
		Enable the SPI6 interface.

endif # BCM2711_SPI

endmenu # Broadcom BCM2711 Peripheral Selection

endif # ARCH_CHIP_BCM2711
