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

Radxa Zero 3W: add pwm support #928

Open
wants to merge 3 commits 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: 4 additions & 0 deletions src/adafruit_blinka/board/radxa/radxazero3.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@
RXD = D0_D0
TX = D0_D1
RX = D0_D0

# PWM
PWM8 = D3_B1
PWM9 = D3_B2
10 changes: 10 additions & 0 deletions src/adafruit_blinka/microcontroller/rockchip/rk3566/pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,16 @@
globals()[alias + "_TX"] = GPIO2_A4
globals()[alias + "_RX"] = GPIO2_A3
uartPorts.append((int(alias[-1]), GPIO2_A4, GPIO2_A3))

if board in ("RADXA_ZERO3"):
alias = get_pwm_chipid("fe6f0000.pwm")
if alias is not None:
globals()["PWM" + alias] = GPIO3_B1
pwmOuts.append(((int(alias[-1]), 0), GPIO3_B1))
alias = get_pwm_chipid("fe6f0010.pwm")
if alias is not None:
globals()["PWM" + alias] = GPIO3_B2
pwmOuts.append(((int(alias[-1]), 0), GPIO3_B2))

analogIns = tuple(analogIns)
i2cPorts = tuple(i2cPorts)
Expand Down
Loading