Skip to content

Commit

Permalink
Enable PWM
Browse files Browse the repository at this point in the history
  • Loading branch information
clupprich authored and fhunleth committed Jan 18, 2025
1 parent dd76827 commit 0282338
Show file tree
Hide file tree
Showing 3 changed files with 24 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
3 changes: 3 additions & 0 deletions linux-6.6.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ CONFIG_MAILBOX=y
CONFIG_BCM2835_MBOX=y
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_RASPBERRYPI_POWER=y
CONFIG_PWM=y
CONFIG_PWM_BCM2835=m
CONFIG_PWM_RASPBERRYPI_POE=m
CONFIG_GENERIC_PHY=y
CONFIG_NVMEM_RMEM=y
CONFIG_F2FS_FS=y
Expand Down

0 comments on commit 0282338

Please sign in to comment.