Skip to content

Commit

Permalink
Enable PWM
Browse files Browse the repository at this point in the history
  • Loading branch information
clupprich committed Oct 9, 2024
1 parent 1e80961 commit 4c47658
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
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

0 comments on commit 4c47658

Please sign in to comment.