技术专栏
Hi3519AV100开启UART串口
1.首先找到内核源码 Hi3519AV100_SDK_V2.0.2.0/osdrv/opensource/kernel/linux-4.9.y
2.修改hi3519av100.dts文件:源码/arch/arm/boot/dts/hi3519av100.dts
&uart0 {
status = "okay";
};
&uart1 { //自行加入
status = "okay"; //自行加入
}; //自行加入
&uart2 { //自行加入
status = "okay"; //自行加入
}; //自行加入
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
3.修改hi3519av100.dtsi文件:源码/arch/arm/boot/dts/hi3519av100.dtsi
aliases {
serial0 = &uart0;
serial1 = &uart1; //自行加入
serial2 = &uart2; //自行加入
amba {
#address-cells = <1>;
#size-cells = <1>;
compatible = "arm,amba-bus";
ranges;
uart0: uart@04540000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x04540000 0x1000>;
interrupts = <0 36 4>;
clocks = <&clock HI3519AV100_UART0_CLK>;
clock-names = "apb_pclk";
status = "okay"; //由disable改为okay
};
uart1: uart@04541000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x04541000 0x1000>;
interrupts = <0 37 4>;
clocks = <&clock HI3519AV100_UART1_CLK>;
clock-names = "apb_pclk";
dmas = <&hiedmacv310_0 2 2>, <&hiedmacv310_0 3 3>;
dma-names = "tx","rx";
status = "okay"; //由disable改为okay
};
uart2: uart@04542000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x04542000 0x1000>;
interrupts = <0 38 4>;
clocks = <&clock HI3519AV100_UART2_CLK>;
clock-names = "apb_pclk";
dmas = <&hiedmacv310_0 4 4>, <&hiedmacv310_0 5 5>;
dma-names = "tx","rx";
status = "okay"; //由disable改为okay
};
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
<
4.打开终端进入到源码目录
cd Hi3519AV100_SDK_V2.0.2.0/osdrv/opensource/kernel/linux-4.9.y
- 1
5.拷贝对应的配置文件
cp arch/arm/configs/hi3519av100_xxxxxx_defconfig .config
- 1
可选的配置文件如下:
hi3519av100_amp_defconfig
hi3519av100_amp_nand_defconfig
hi3519av100_amp_emmc_defconfig
hi3519av100_smp_defconfig
hi3519av100_smp_nand_defconfig
hi3519av100_smp_emmc_defconfig
- 1
- 2
- 3
- 4
- 5
- 6
6.编译,进入kernel configuration
make ARCH=arm CROSS_COMPILE=arm-himix200-linux- menuconfig
- 1
按照如下配置:
Device Drivers --->
Character devices --->
Serial drivers --->
<*> ARM AMBA PL011 serial port support
[*] Support for console on AMBA serial port
- 1
- 2
- 3
- 4
- 5
保存修改并退出
7.编译生成uImage
make ARCH=arm CROSS_COMPILE=arm-himix200-linux- uImage
- 1
8. ls /dev就会查看到 ttyAMA0 ttyAMA1 ttyAMA2 了
版权声明:本文为CSDN博主「十月怀胎肚儿」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u012915226/article/details/119451986原文链接:https://blog.csdn.net/u012915226/article/details/119451986
声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
红包
点赞
收藏
评论
打赏
- 分享
- 举报
评论
0个
手气红包

相关专栏
-
浏览量:1421次2023-10-12 14:25:01
-
浏览量:2034次2024-01-08 17:24:15
-
浏览量:902次2024-01-10 14:28:04
-
浏览量:2367次2023-10-13 14:34:01
-
2020-08-10 09:21:07
-
浏览量:1022次2024-01-08 18:13:05
-
浏览量:2805次2020-08-04 20:30:30
-
浏览量:2624次2021-12-03 17:42:05
-
浏览量:7653次2020-09-06 16:25:23
-
浏览量:2429次2020-08-05 21:02:35
-
浏览量:1122次2023-10-25 15:43:39
-
浏览量:4582次2020-08-05 20:40:46
-
浏览量:11071次2020-08-03 14:27:03
-
浏览量:4491次2019-12-16 13:54:11
-
浏览量:4969次2020-08-14 11:29:53
-
浏览量:3463次2019-12-28 10:19:54
-
浏览量:3888次2022-01-04 09:00:18
-
浏览量:2769次2019-12-28 10:23:43
-
浏览量:3452次2020-08-10 19:30:45
置顶时间设置
结束时间
删除原因
-
广告/SPAM
-
恶意灌水
-
违规内容
-
文不对题
-
重复发帖
打赏作者

outman
您的支持将鼓励我继续创作!
打赏金额:
¥1

¥5

¥10

¥50

¥100

支付方式:

举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
审核成功
发布时间设置
发布时间:
请选择发布时间设置
是否关联周任务-专栏模块
审核失败
失败原因
请选择失败原因
备注
请输入备注