Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable PWM #254

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ dtoverlay=ramoops
# Enable the UART (/dev/ttyS0)
enable_uart=1

# Comment this in or modify to enable PWM
# dtoverlay=pwm

[cm4]
# Raspberry Pi CM4-only settings

# For the CM4 I/O board, USB is disabled by default. This enables it.
dtoverlay=dwc2,dr_mode=host

18 changes: 18 additions & 0 deletions fwup.conf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ file-resource ov5647.dtbo {
file-resource i2c-mux.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/i2c-mux.dtbo"
}
file-resource pwm-2chan.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/pwm-2chan.dtbo"
}
file-resource pwm.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/pwm.dtbo"
}
file-resource pwm1.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/pwm1.dtbo"
}

file-resource rootfs.img {
host-path = ${ROOTFS}
Expand Down Expand Up @@ -197,6 +206,9 @@ task complete {
on-resource imx708.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/imx708.dtbo") }
on-resource ov5647.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/ov5647.dtbo") }
on-resource i2c-mux.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/i2c-mux.dtbo") }
on-resource pwm-2chan.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/pwm-2chan.dtbo") }
on-resource pwm.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/pwm.dtbo") }
on-resource pwm1.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/pwm1.dtbo") }

on-resource rootfs.img {
# write to the first rootfs partition
Expand Down Expand Up @@ -274,6 +286,9 @@ task upgrade.a {
on-resource imx708.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/imx708.dtbo") }
on-resource ov5647.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/ov5647.dtbo") }
on-resource i2c-mux.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/i2c-mux.dtbo") }
on-resource pwm-2chan.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/pwm-2chan.dtbo") }
on-resource pwm.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/pwm.dtbo") }
on-resource pwm1.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/pwm1.dtbo") }

on-resource rootfs.img {
delta-source-raw-offset=${ROOTFS_B_PART_OFFSET}
Expand Down Expand Up @@ -359,6 +374,9 @@ task upgrade.b {
on-resource imx708.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/imx708.dtbo") }
on-resource ov5647.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/ov5647.dtbo") }
on-resource i2c-mux.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/i2c-mux.dtbo") }
on-resource pwm-2chan.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/pwm-2chan.dtbo") }
on-resource pwm.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/pwm.dtbo") }
on-resource pwm1.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/pwm1.dtbo") }

on-resource rootfs.img {
delta-source-raw-offset=${ROOTFS_A_PART_OFFSET}
Expand Down
7 changes: 7 additions & 0 deletions linux-6.6.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,10 @@ CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=5
CONFIG_PRINTK_TIME=y
CONFIG_PANIC_TIMEOUT=10
# PWM
CONFIG_PWM=y
CONFIG_PWM_BCM2835=m
CONFIG_PWM_BRCMSTB=y
CONFIG_PWM_PCA9685=m
CONFIG_PWM_RASPBERRYPI_POE=m
CONFIG_PWM_RP1=y