Repository navigation
arm: dts: hi3518ev20x: enable uart1 so boards can mux it for PTZ - #170
Merged
Merged
Conversation
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.
PR Summary by QodoEnable UART1 in the hi3518ev20x board device tree
AI Description
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can switch off images and animations for a plain-text comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. Hereuart1is disabled inhi3518ev20x-demb.dts, so that device doesn't exist. Today's only way to reach the mount is a script writing the UART's registers throughdevmem, which won't work formajestic-af, because it needs a tty.Change:
&uart1set tostatus = "okay". Theserial1alias 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
0x200f00c0and0x200f00c8to UART1.Reach:
hi3518ev20x-demb.dtsis 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-hx20yuImage, and booted it on qemu-bench's hi3516cv200 machine.The console stays on
ttyAMA0.stty -F /dev/ttyAMA1 9600 raw -echothen aprintfof a Pelco-D frame gaveff 01 00 02 20 00 23on 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
devmemscript so far, which shows the wiring and baud rate are right, not this driver.