define FRIENDLYARM_NANOPI_R2S_LINUX_CONFIG_FIXUPS
	# Rockchip RK3328 SoC
	$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_ROCKCHIP)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ROCKCHIP_IOMMU)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ROCKCHIP_PM_DOMAINS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ROCKCHIP_IODOMAIN)
	# TODO: for some reason this just locks up the device
	#       so we'll have to rely on the softdog :-(
	# $(call KCONFIG_ENABLE_OPT,CONFIG_DW_WATCHDOG)

	# PHY drivers
	$(call KCONFIG_ENABLE_OPT,CONFIG_PHY_ROCKCHIP_EMMC)
	$(call KCONFIG_ENABLE_OPT,CONFIG_PHY_ROCKCHIP_INNO_USB2)
	$(call KCONFIG_ENABLE_OPT,CONFIG_PHY_ROCKCHIP_TYPEC)
	$(call KCONFIG_SET_OPT,CONFIG_PHY_ROCKCHIP_USB,m)
	$(call KCONFIG_SET_OPT,CONFIG_PHY_ROCKCHIP_PCIE,m)
	$(call KCONFIG_ENABLE_OPT,CONFIG_ROCKCHIP_PHY)

	# Clocks and Power Management
	$(call KCONFIG_ENABLE_OPT,CONFIG_COMMON_CLK_ROCKCHIP)
	$(call KCONFIG_ENABLE_OPT,CONFIG_CLK_RK3328)
	$(call KCONFIG_ENABLE_OPT,CONFIG_COMMON_CLK_PWM)
	$(call KCONFIG_ENABLE_OPT,CONFIG_PWM_ROCKCHIP)
	$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_GPIO)
	$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_RK808)
	$(call KCONFIG_ENABLE_OPT,CONFIG_CHARGER_RK817)
	$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_RK805)

	# I2C Controller
	$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_RK3X)

	# I2C/SPI/MFD
	$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_RK8XX_I2C)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_RK8XX_SPI)
	$(call KCONFIG_ENABLE_OPT,CONFIG_SPI_ROCKCHIP)
	$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_RK805_PWRKEY)
	$(call KCONFIG_ENABLE_OPT,CONFIG_RTC_DRV_RK808)

	# MMC/Storage
	$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_DW_ROCKCHIP)

	# PCIe
	$(call KCONFIG_SET_OPT,CONFIG_PCIE_ROCKCHIP_HOST,m)
	$(call KCONFIG_ENABLE_OPT,CONFIG_PCIE_ROCKCHIP_DW_HOST)

	# Thermal and ADC
	$(call KCONFIG_SET_OPT,CONFIG_ROCKCHIP_THERMAL,m)
	$(call KCONFIG_SET_OPT,CONFIG_ROCKCHIP_SARADC,m)

	# Crypto
	$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEV_ROCKCHIP)

	# NVMEM
	$(call KCONFIG_SET_OPT,CONFIG_NVMEM_ROCKCHIP_EFUSE,m)
	$(call KCONFIG_SET_OPT,CONFIG_NVMEM_ROCKCHIP_OTP,m)

	# Input layer
	$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_MISC)
	$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_RK805_PWRKEY)

	# Network: STMMAC Ethernet (WAN port - RK3328 GMAC with RTL8211E PHY)
	$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_STMICRO)
	$(call KCONFIG_ENABLE_OPT,CONFIG_STMMAC_ETH)
	$(call KCONFIG_ENABLE_OPT,CONFIG_STMMAC_PLATFORM)
	$(call KCONFIG_ENABLE_OPT,CONFIG_DWMAC_ROCKCHIP)
	$(call KCONFIG_ENABLE_OPT,CONFIG_REALTEK_PHY)

	# Network: USB Ethernet (LAN port - RTL8153 via USB 3.0)
	$(call KCONFIG_SET_OPT,CONFIG_USB_NET_DRIVERS,m)
	$(call KCONFIG_SET_OPT,CONFIG_USB_RTL8152,m)

	# USB 3.0 xHCI Controller (required for RTL8153 LAN port)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_XHCI_HCD)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_XHCI_PLATFORM)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC3)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC3_HOST)

	# USB 2.0 Host
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_EHCI_HCD)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_EHCI_HCD_PLATFORM)
	$(call KCONFIG_ENABLE_OPT,CONFIG_USB_EHCI_ROOT_HUB_TT)
endef

$(eval $(ix-board))
$(eval $(generic-package))
