samson
February 12, 2020, 6:39am
1
Hi all
We are working on Android 9 and want to use uart4, but we don’t know how to enable uart4.
We follow the reference(https://wiki.radxa.com/Rockpi4/hardware/devtree_overlays ) but can’t find anything.
please help us.
n0tiert
February 12, 2020, 8:24am
2
check the files:
/*
* Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
This file has been truncated. show original
// Definitions for setting uart4 pins as ttyFIQ0 console pins
/dts-v1/;
/plugin/;
/ {
model = "ROCK PI 4B";
compatible = "rockchip,rockpi","rockchip,rk3399";
fragment@0 {
target = <&uart2>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&fiq_debugger>;
__overlay__ {
This file has been truncated. show original
// Definitions for setting uart4 pins as ttyFIQ0 console pins
/dts-v1/;
/plugin/;
/ {
model = "ROCK PI 4B";
compatible = "rockchip,rockpi","rockchip,rk3399";
fragment@0 {
target = <&uart4>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&fiq_debugger>;
__overlay__ {
This file has been truncated. show original
after changes you need to recompile the Kernel
samson
February 13, 2020, 1:58am
3
We have downloaded the source code from https://github.com/radxa/manifests/tree/rockpi-box-9.0 but can’t find the files you said in kernel.
Do we replace it with new kernel from radxa/kernel ?
n0tiert
February 13, 2020, 3:27am
4
the main file is:
/kernel/arch/arm64/boot/dts/rockchip/rk3399-rockpi-4b.dts
there you´ll find other includes like
#include "rk3399.dtsi"
#include "rk3399-android.dtsi"
#include "rk3399-opp.dtsi"
#include "rk3399-vop-clk-set.dtsi"
the preffered UART overlay file should be added after " #include “rk3399-android.dtsi”
make also shure you define “/dev/ttyS4” with the needed rights to your “ueventd.rockchip.rc” file
and you might also change the bootargs console parameter in file rk3399-rockpi-4b.dts
regards,
Brian