#
# 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.

if BCM2711_I2C0

config BCM2711_I2C0_SDA
	int "I2C0 SDA pin"
	default 0
	---help---
		Selects the GPIO pin to use for I2C0 SDA.

config BCM2711_I2C0_SCL
	int "I2C0 SCL pin"
	default 1
	---help---
		Selects the GPIO pin to use for I2C0 SCL.

endif # BCM2711_I2C0

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

if BCM2711_I2C1

config BCM2711_I2C1_SDA
	int "I2C1 SDA pin"
	default 2
	---help---
		Selects the GPIO pin to use for I2C1 SDA.

config BCM2711_I2C1_SCL
	int "I2C1 SCL pin"
	default 3
	---help---
		Selects the GPIO pin to use for I2C1 SCL.

endif # BCM2711_I2C1

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

if BCM2711_I2C3

config BCM2711_I2C3_SDA
	int "I2C3 SDA pin"
	default 4
	---help---
		Selects the GPIO pin to use for I2C3 SDA.

config BCM2711_I2C3_SCL
	int "I2C3 SCL pin"
	default 5
	---help---
		Selects the GPIO pin to use for I2C3 SCL.

endif # BCM2711_I2C3

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

if BCM2711_I2C4

config BCM2711_I2C4_SDA
	int "I2C4 SDA pin"
	default 8
	---help---
		Selects the GPIO pin to use for I2C4 SDA.

config BCM2711_I2C4_SCL
	int "I2C4 SCL pin"
	default 9
	---help---
		Selects the GPIO pin to use for I2C4 SCL.

endif # BCM2711_I2C4

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

if BCM2711_I2C5

config BCM2711_I2C5_SDA
	int "I2C5 SDA pin"
	default 12
	---help---
		Selects the GPIO pin to use for I2C5 SDA.

config BCM2711_I2C5_SCL
	int "I2C5 SCL pin"
	default 13
	---help---
		Selects the GPIO pin to use for I2C5 SCL.

endif # BCM2711_I2C5

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

if BCM2711_I2C6

config BCM2711_I2C6_SDA
	int "I2C6 SDA pin"
	default 22
	---help---
		Selects the GPIO pin to use for I2C6 SDA.

config BCM2711_I2C6_SCL
	int "I2C6 SCL pin"
	default 23
	---help---
		Selects the GPIO pin to use for I2C6 SCL.

endif # BCM2711_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

#####################################################################
# SDMMC Configuration
#####################################################################

config BCM2711_EMMC
	bool "EMMC support"
	select MMCSD
	select MMCSD_SDIO
	select SDIO_BLOCKSETUP
	depends on EXPERIMENTAL
	default n
	---help---
		Enables support for EMMC interfaces.

if BCM2711_EMMC

config BCM2711_EMMC1
	bool "EMMC1 interface support"
	depends on BCM2711_EMMC
	default n
	---help---
		Enables support for the EMMC1 interface.

config BCM2711_EMMC1_XFERSPEED
	int "EMMC1 transfer speed (Hz)"
	depends on BCM2711_EMMC1
	range 25000000 208000000
	default 25000000
	---help---
		The transfer speed in Hz to use for EMMC1 transfers.

config BCM2711_EMMC2
	bool "EMMC2 interface support"
	depends on BCM2711_EMMC
	default n
	---help---
		Enables support for the EMMC2 interface.

config BCM2711_EMMC2_XFERSPEED
	int "EMMC2 transfer speed (Hz)"
	depends on BCM2711_EMMC2
	range 25000000 208000000
	default 25000000
	---help---
		The transfer speed in Hz to use for EMMC2 transfers.

endif # BCM2711_EMMC

#####################################################################
# Graphics
#####################################################################

config BCM2711_FRAMEBUFFER
	bool "Frame buffer graphics support"
	depends on VIDEO_FB
	default n
	---help---
		Support for the VideoCore frame buffer interface.

endmenu # Broadcom BCM2711 Peripheral Selection

endif # ARCH_CHIP_BCM2711
