bcm27xx/bcm2712: add RP1 drivers via kmods

Add kmods for PWM control, composite video, display video, and
serial video which not all users necessarily need or want.

Build system: x86/64
Build-tested: bcm2712/RPi5B
Run-tested: bcm2712/RPi5B

Signed-off-by: John Audia <therealgraysky@proton.me>
This commit is contained in:
John Audia 2024-12-11 15:06:30 -05:00
parent da5caf39dc
commit 900197426c
3 changed files with 100 additions and 0 deletions

View File

@ -1,6 +1,7 @@
# CONFIG_BACKLIGHT_RPI is not set
# CONFIG_BCM2712_MIP is not set
# CONFIG_COMMON_CLK_RP1 is not set
# CONFIG_COMMON_CLK_RP1_SDIO is not set
# CONFIG_COMMON_CLK_RP1_SDIO is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9806E is not set
# CONFIG_DRM_PANEL_TPO_Y17P is not set
@ -11,6 +12,7 @@
# CONFIG_FB_RPISENSE is not set
# CONFIG_GPIO_PWM is not set
# CONFIG_INPUT_RASPBERRYPI_BUTTON is not set
# CONFIG_MBOX_RP1 is not set
# CONFIG_MEDIA_PCI_HAILO is not set
# CONFIG_MFD_PM8921_CORE is not set
# CONFIG_MFD_RASPBERRYPI_POE_HAT is not set
@ -19,6 +21,7 @@
# CONFIG_PHY_CADENCE_DP is not set
# CONFIG_PINCTRL_BCM2712 is not set
# CONFIG_PINCTRL_RP1 is not set
# CONFIG_PWM_PIO_RP1 is not set
# CONFIG_PWM_RP1 is not set
# CONFIG_RASPBERRYPI_GPIOMEM is not set
# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_V2 is not set

View File

@ -53,3 +53,22 @@ define KernelPackage/smi-bcm2835-dev/description
endef
$(eval $(call KernelPackage,smi-bcm2835-dev))
define KernelPackage/pwm-pio-rp1
SUBMENU:=$(OTHER_MENU)
TITLE:=RP1 PWM support
KCONFIG:=CONFIG_PWM_PIO_RP1
FILES:=$(LINUX_DIR)/drivers/pwm/pwm-pio-rp1.ko
AUTOLOAD:=$(call AutoLoad,20,pwm-pio-rp1)
DEPENDS:=@TARGET_bcm27xx_bcm2712
endef
define KernelPackage/pwm-pio-rp1/description
Enables precise control of PWM signals for tasks like motor control,
LED dimming, and audio signal generation. Leveraging PIO allows for
higher accuracy and flexibility in PWM signal generation compared
to traditional hardware timers.
endef
$(eval $(call KernelPackage,pwm-pio-rp1))

View File

@ -115,3 +115,81 @@ define KernelPackage/vchiq-mmal-bcm2835/description
endef
$(eval $(call KernelPackage,vchiq-mmal-bcm2835))
define KernelPackage/drm-rp1-dsi
SUBMENU:=$(VIDEO_MENU)
TITLE:=RP1 Display Serial Interface for Video
KCONFIG:= \
CONFIG_DRM_RP1_DSI \
CONFIG_DRM_GEM_DMA_HELPER \
CONFIG_DRM_KMS_HELPER \
CONFIG_DRM_MIPI_DSI=y \
CONFIG_DRM_VRAM_HELPER=n \
CONFIG_DRM_TTM=n \
CONFIG_DRM_TTM_HELPER=n \
CONFIG_GENERIC_PHY_MIPI_DPHY=n \
CONFIG_DRM_WERROR=n
FILES:=$(LINUX_DIR)/drivers/gpu/drm/rp1/rp1-dsi/drm-rp1-dsi.ko
AUTOLOAD:=$(call AutoLoad,67,drm-rp1-dsi)
DEPENDS:=@TARGET_bcm27xx_bcm2712 +kmod-drm-vc4
endef
define KernelPackage/drm-rp1-dsi/description
This module manages the DSI for driving high-resolution LCD panels
such as the official Raspberry Pi displays or other screens that
use the DSI interface.
endef
$(eval $(call KernelPackage,drm-rp1-dsi))
define KernelPackage/drm-rp1-dpi
SUBMENU:=$(VIDEO_MENU)
TITLE:=RP1 Display Parallel Interface for Video
KCONFIG:= \
CONFIG_DRM_RP1_DPI \
CONFIG_DRM_GEM_DMA_HELPER \
CONFIG_DRM_KMS_HELPER \
CONFIG_DRM_VRAM_HELPER=n \
CONFIG_DRM_TTM=n \
CONFIG_DRM_TTM_HELPER=n
FILES:=$(LINUX_DIR)/drivers/gpu/drm/rp1/rp1-dpi/drm-rp1-dpi.ko
AUTOLOAD:=$(call AutoLoad,67,drm-rp1-dpi)
DEPENDS:=@TARGET_bcm27xx_bcm2712 +kmod-drm-vc4
endef
define KernelPackage/drm-rp1-dpi/description
This module is or driving displays using the DPI standard.
Useful for interfacing with custom or low-level LCD panels
that require parallel RGB signals. Provides direct control
over the timing and signal driving of raw LCD panels.
Typically used in maker projects or with non-HDMI displays.
endef
$(eval $(call KernelPackage,drm-rp1-dpi))
define KernelPackage/drm-rp1-vec
SUBMENU:=$(VIDEO_MENU)
TITLE:=RP1 Display Composite Video
KCONFIG:= \
CONFIG_DRM_RP1_VEC \
CONFIG_DRM_GEM_DMA_HELPER \
CONFIG_DRM_KMS_HELPER \
CONFIG_DRM_VRAM_HELPER=n \
CONFIG_DRM_TTM=n \
CONFIG_DRM_TTM_HELPER=n
FILES:=$(LINUX_DIR)/drivers/gpu/drm/rp1/rp1-vec/drm-rp1-vec.ko
AUTOLOAD:=$(call AutoLoad,67,drm-rp1-vec)
DEPENDS:=@TARGET_bcm27xx_bcm2712 +kmod-drm-vc4
endef
define KernelPackage/drm-rp1-vec/description
This module is used for composite video output, which is typically
transmitted through the RCA jack. Primary use is onnecting older
TVs or monitors that rely on analog signals via a composite interface.
Handles standard-definition analog signals in NTSC and PAL.
endef
$(eval $(call KernelPackage,drm-rp1-vec))