Skip to content

Commit

Permalink
Set RS485 mode for ttyXRUSB2/3 on kontron devices
Browse files Browse the repository at this point in the history
On Kontron devices 402/403/202 set ports 2 and 3 to RS485 Half-duplaex mode

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
(cherry picked from commit 43d4521)
  • Loading branch information
rucoder authored and OhmSpectator committed Sep 12, 2024
1 parent 82ea5e5 commit 595e684
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/grub/rootfs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ function set_x86_64_baremetal {
set_global dom0_platform_tweaks "$dom0_platform_tweaks pci=realloc=off"
fi
fi
if [ "$smb_vendor" = "Kontron America" ]; then
smbios -t 1 -s 5 --set smb_product
# switch ttyXRUSB2/3 to RS485 Half-Duplex mode
if regexp -- "Agora Gateway" "$smb_product"; then
set_global dom0_platform_tweaks "$dom0_platform_tweaks xr_usb_serial_common.mode=2h,3h"
fi
fi
set_global ucode /boot/ucode.img
}

Expand Down

0 comments on commit 595e684

Please sign in to comment.