Skip to content

arm: dts: hi3518ev20x: enable uart1 so boards can mux it for PTZ - #170

Merged
openipc-ai merged 1 commit into
hisilicon-hi3516cv200from
hi3518ev20x-uart1
Nov 6, 2026
Merged

openipc-ai merged 1 commit into
hisilicon-hi3516cv200from
hi3518ev20x-uart1

Conversation

@openipc-ai

Copy link
Copy Markdown

For OpenIPC/firmware#2675. A Baolian hi3518ev200 camera drives its pan/tilt mount with Pelco-D over RS-485 on UART1, and the factory firmware opens /dev/ttyAMA1. Here uart1 is disabled in hi3518ev20x-demb.dts, so that device doesn't exist. Today's only way to reach the mount is a script writing the UART's registers through devmem, which won't work for majestic-af, because it needs a tty.

Change: &uart1 set to status = "okay". The serial1 alias is already in this file. This follows #111 for hi3516a.

No pinmux. The pads that can carry UART1 stay as they are, so a board that doesn't mux them sees no change on the wire and only gains a tty node. On the Baolian, the board's own profile muxes 0x200f00c0 and 0x200f00c8 to UART1.

Reach: hi3518ev20x-demb.dts is the DTB all three SoCs of this family append (hi3516cv200, hi3518ev200, hi3518ev201), so every camera of the family gains /dev/ttyAMA1.

Tested in QEMU: I compiled this tree, swapped the DTB into the published hi3518ev200_lite_baolian-11r6w25-hx20y uImage, and booted it on qemu-bench's hi3516cv200 machine.

20080000.uart: ttyAMA0 at MMIO 0x20080000 (irq = 21, base_baud = 0) is a PL011 rev1
console [ttyAMA0] enabled
20090000.uart: ttyAMA1 at MMIO 0x20090000 (irq = 46, base_baud = 0) is a PL011 rev1

The console stays on ttyAMA0. stty -F /dev/ttyAMA1 9600 raw -echo then a printf of a Pelco-D frame gave ff 01 00 02 20 00 23 on the model's second UART.

Not tested on hardware. This was not built as a whole kernel, and QEMU's clock and pin models prove nothing about real pads. The mount on the reporter's camera has only been driven by the devmem script so far, which shows the wiring and baud rate are right, not this driver.

A Baolian hi3518ev200 camera drives its pan/tilt mount over RS-485 on UART1
(OpenIPC/firmware#2675). With uart1 disabled there is no /dev/ttyAMA1 to send
on, whatever the board does with its pads.

The serial1 alias is already in this file. No pinmux: a board that leaves
its pads alone sees no change on the wire and only gains a tty node.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Enable UART1 in the hi3518ev20x board device tree

✨ Enhancement ⚙️ Configuration changes 🕐 Less than 5 minutes

Grey Divider

AI Description

• Enable UART1 so hi3518ev20x systems expose a tty for serial-connected devices such as PTZ mounts.
• Leave pin multiplexing to board profiles; this change does not route UART1 to physical pads.
High-Level Assessment

Enabling the existing UART node is the smallest change that makes a tty available. Keeping pinmux out of this shared device tree lets individual boards control whether UART1 reaches their pads.

Files changed (1) +1 / -1

Enhancement (1) +1 / -1
hi3518ev20x-demb.dtsEnable the existing UART1 node +1/-1

Enable the existing UART1 node

• Changes UART1's status from disabled to okay. Its existing serial1 alias can now expose the port to the operating system without changing pad multiplexing.

arch/arm/boot/dts/hi3518ev20x-demb.dts

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai
openipc-ai merged commit a9e9879 into hisilicon-hi3516cv200 Nov 6, 2026
@openipc-ai
openipc-ai deleted the hi3518ev20x-uart1 branch November 6, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant