Linux第36步_创建正点原子的TF-A工作区

创建正点原子的TF-A工作区,目的是想查看正点原子的设备树文件“stm32mp157d-atk.dts”设备树头文件“stm32mp157d-atk.dtsi”,了解设备树是什么样子,为后期基于“ST公司的源码”创建自己的设备树提供参考,同时也是为了学习移植uboot。

1、在Ubuntu桌面,找到Visual Studio Code,在图标上右击鼠标,点击“打开”,见下图:

得到下图:

2、点击“文件”,再点击“打开文件夹”,见下图:

3、点击下图中的“其他位置”

4、点击“计算机”-à“home” -à“zgq”-à“linux”-à“atk_mp1”-àalientek_tf-a

见下图:

5、点击 “确定”

6、将“欢迎使用”关闭,再点击“文件”,点击“将工作区另存为…”,见下图操作:

得到下图:

7、输入“tf-a”,再点击“保存”

得到下图:

8、点击“tf-a-stm32mp-2.2.r1”,得到下图:

9、点击“fdts”,然后点击“stm32mp157d-atk.dts”,查看设备树文件,见下图:

stm32mp157d-atk.dts”内容如下:

// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)

/*

 * Copyright (C) STMicroelectronics 2019 - All Rights Reserved

 * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.

 */

/dts-v1/;

#include "stm32mp157.dtsi"

#include "stm32mp15xd.dtsi"

#include "stm32mp15-pinctrl.dtsi"

#include "stm32mp15xxaa-pinctrl.dtsi"

#include "stm32mp157d-atk.dtsi"

#include <dt-bindings/soc/st,stm32-etzpc.h>

/ {

model = "STMicroelectronics STM32MP157D eval daughter";

compatible = "st,stm32mp157d-atk", "st,stm32mp157";

chosen {

stdout-path = "serial0:115200n8";

};

aliases {

serial0 = &uart4;

};

};

&cpu1 {

cpu-supply = <&vddcore>;

};

&etzpc {

st,decprot = <

DECPROT(STM32MP1_ETZPC_USART1_ID,DECPROT_NS_RW,DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_SPI6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_I2C4_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_I2C6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_RNG1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_HASH1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_S_RW, DECPROT_LOCK)

DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_S_RW, DECPROT_LOCK)

DECPROT(STM32MP1_ETZPC_STGENC_ID, DECPROT_S_RW, DECPROT_LOCK)

DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_S_RW, DECPROT_LOCK)

DECPROT(STM32MP1_ETZPC_IWDG1_ID, DECPROT_S_RW, DECPROT_LOCK)

>;

};

10、点击“fdts”,然后点击“stm32mp157d-atk.dtsi”,查看设备树头文件,见下图:

stm32mp157d-atk.dtsi”内容如下:

// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)

/*

 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved

 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.

 */

#include <dt-bindings/clock/stm32mp1-clksrc.h>

#include <dt-bindings/power/stm32mp1-power.h>

#include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"

/ {

memory@c0000000 {

device_type = "memory";

reg = <0xC0000000 0x40000000>;

};

   vddcore: regulator-vddcore {

        compatible = "regulator-fixed";

        regulator-name = "vddcore";

        regulator-min-microvolt = <1200000>;

        regulator-max-microvolt = <1350000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    vdd_ddr: regulator-vdd-ddr {

        compatible = "regulator-fixed";

        regulator-name = "vdd_ddr";

        regulator-min-microvolt = <1350000>;

        regulator-max-microvolt = <1350000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    vdda: regulator-vvdda {

        compatible = "regulator-fixed";

        regulator-name = "vdda";

        regulator-min-microvolt = <2900000>;

        regulator-max-microvolt = <2900000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    vtt_ddr: regulator-vtt-ddr {

        compatible = "regulator-fixed";

        regulator-name = "vtt_ddr";

        regulator-min-microvolt = <500000>;

        regulator-max-microvolt = <750000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    v3v3: regulator-3p3v {

        compatible = "regulator-fixed";

        regulator-name = "v3v3";

        regulator-min-microvolt = <3300000>;

        regulator-max-microvolt = <3300000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    v1v8_audio: regulator-v1v8-audio {

        compatible = "regulator-fixed";

        regulator-name = "v1v8_audio";

        regulator-min-microvolt = <1800000>;

        regulator-max-microvolt = <1800000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    v3v3_hdmi: regulator-v3v3-hdmi {

        compatible = "regulator-fixed";

        regulator-name = "v3v3_hdmi";

        regulator-min-microvolt = <3300000>;

        regulator-max-microvolt = <3300000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    v1v2_hdmi: regulator-v1v2-hdmi {

        compatible = "regulator-fixed";

        regulator-name = "v1v2_hdmi";

        regulator-min-microvolt = <1200000>;

        regulator-max-microvolt = <1200000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    vdd: regulator-vdd {

        compatible = "regulator-fixed";

        regulator-name = "vdd";

        regulator-min-microvolt = <3300000>;

        regulator-max-microvolt = <3300000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    vdd_usb: regulator-vdd-usb {

        compatible = "regulator-fixed";

        regulator-name = "vdd_usb";

        regulator-min-microvolt = <3300000>;

        regulator-max-microvolt = <3300000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

    v2v8: regulator-v2v8 {

        compatible = "regulator-fixed";

        regulator-name = "v2v8";

        regulator-min-microvolt = <2800000>;

        regulator-max-microvolt = <2800000>;

        regulator-off-in-suspend;

        regulator-always-on;

    };

};

&bsec {

board_id: board_id@ec {

reg = <0xec 0x4>;

st,non-secure-otp;

};

};

&clk_hse {

st,digbypass;

};

&cpu0{

cpu-supply = <&vddcore>;

};

&hash1 {

status = "okay";

};

&iwdg2 {

    timeout-sec = <32>;

    status = "okay";

    secure-status = "okay";

};

&nvmem_layout {

nvmem-cells = <&cfg0_otp>,

      <&part_number_otp>,

      <&monotonic_otp>,

      <&nand_otp>,

      <&uid_otp>,

      <&package_otp>,

      <&hw2_otp>,

      <&pkh_otp>,

      <&board_id>;

nvmem-cell-names = "cfg0_otp",

   "part_number_otp",

   "monotonic_otp",

   "nand_otp",

   "uid_otp",

   "package_otp",

   "hw2_otp",

   "pkh_otp",

   "board_id";

};

&pwr_regulators {

system_suspend_supported_soc_modes = <

STM32_PM_CSLEEP_RUN

STM32_PM_CSTOP_ALLOW_LP_STOP

STM32_PM_CSTOP_ALLOW_LPLV_STOP

STM32_PM_CSTOP_ALLOW_STANDBY_DDR_SR

>;

system_off_soc_mode = <STM32_PM_CSTOP_ALLOW_STANDBY_DDR_OFF>;

vdd-supply = <&vdd>;

vdd_3v3_usbfs-supply = <&vdd_usb>;

};

&rcc {

st,hsi-cal;

st,csi-cal;

st,cal-sec = <60>;

st,clksrc = <

CLK_MPU_PLL1P

CLK_AXI_PLL2P

CLK_MCU_PLL3P

CLK_PLL12_HSE

CLK_PLL3_HSE

CLK_PLL4_HSE

CLK_RTC_LSE

CLK_MCO1_DISABLED

CLK_MCO2_DISABLED

>;

st,clkdiv = <

1 /*MPU*/

0 /*AXI*/

0 /*MCU*/

1 /*APB1*/

1 /*APB2*/

1 /*APB3*/

1 /*APB4*/

2 /*APB5*/

23 /*RTC*/

0 /*MCO1*/

0 /*MCO2*/

>;

st,pkcs = <

CLK_CKPER_HSE

CLK_FMC_ACLK

CLK_QSPI_ACLK

CLK_ETH_DISABLED

CLK_SDMMC12_PLL4P

CLK_DSI_DSIPLL

CLK_STGEN_HSE

CLK_USBPHY_HSE

CLK_SPI2S1_PLL3Q

CLK_SPI2S23_PLL3Q

CLK_SPI45_HSI

CLK_SPI6_HSI

CLK_I2C46_HSI

CLK_SDMMC3_PLL4P

CLK_USBO_USBPHY

CLK_ADC_CKPER

CLK_CEC_LSE

CLK_I2C12_HSI

CLK_I2C35_HSI

CLK_UART1_HSI

CLK_UART24_HSI

CLK_UART35_HSI

CLK_UART6_HSI

CLK_UART78_HSI

CLK_SPDIF_PLL4P

CLK_FDCAN_PLL4R

CLK_SAI1_PLL3Q

CLK_SAI2_PLL3Q

CLK_SAI3_PLL3Q

CLK_SAI4_PLL3Q

CLK_RNG1_LSI

CLK_RNG2_LSI

CLK_LPTIM1_PCLK1

CLK_LPTIM23_PCLK3

CLK_LPTIM45_LSE

>;

/* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */

pll2: st,pll@1 {

compatible = "st,stm32mp1-pll";

reg = <1>;

cfg = <2 65 1 0 0 PQR(1,1,1)>;

frac = <0x1400>;

};

/* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */

pll3: st,pll@2 {

compatible = "st,stm32mp1-pll";

reg = <2>;

cfg = <1 33 1 16 36 PQR(1,1,1)>;

frac = <0x1a04>;

};

/* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */

pll4: st,pll@3 {

compatible = "st,stm32mp1-pll";

reg = <3>;

cfg = <3 98 5 7 7 PQR(1,1,1)>;

};

};

&sdmmc1 {

pinctrl-names = "default";

pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;

st,neg-edge;

    broken-cd;

bus-width = <4>;

vmmc-supply = <&v3v3>;

status = "okay";

};

&sdmmc2 {

pinctrl-names = "default";

pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;

non-removable;

st,neg-edge;

bus-width = <8>;

vmmc-supply = <&v3v3>;

    vqmmc-supply = <&v3v3>;

status = "okay";

};

&uart4 {

pinctrl-names = "default";

pinctrl-0 = <&uart4_pins_a>;

status = "okay";

};

&usbotg_hs {

phys = <&usbphyc_port1 0>;

phy-names = "usb2-phy";

usb-role-switch;

status = "okay";

};

&usbphyc {

status = "okay";

};

&usbphyc_port0 {

phy-supply = <&vdd_usb>;

};

&usbphyc_port1 {

phy-supply = <&vdd_usb>;

};

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/433786.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【Java】SpringMVC路径写法

1、多级路径 ✅类路径和方法路径都可以写成多级 ✅其中&#xff0c;类路径写在方法路径前面 ✅与Servlet不同&#xff0c;SpringMVC中写不写“/”都可以 RequestMapping("/hello/t1") RestController public class HelloSpring {RequestMapping( value "world…

Java程序设计实验7 | IO流

*本文是博主对Java各种实验的再整理与详解&#xff0c;除了代码部分和解析部分&#xff0c;一些题目还增加了拓展部分&#xff08;⭐&#xff09;。拓展部分不是实验报告中原有的内容&#xff0c;而是博主本人自己的补充&#xff0c;以方便大家额外学习、参考。 目录 一、实验…

C语言第十弹---函数(上)

✨个人主页&#xff1a; 熬夜学编程的小林 &#x1f497;系列专栏&#xff1a; 【C语言详解】 【数据结构详解】 函数 1、函数的概念 2、库函数 2.1、标准库和头文件 2.2、库函数的使用方法 2.2.1、功能 2.2.2、头文件包含 2.2.3、实践 2.2.4、库函数文档的⼀般格式 …

c++实现常见排序算法

常见算法效率比较 冒泡排序&#xff1a;依次比较相邻数据并根据排序规则交换&#xff1b; 插入排序&#xff1a;将当前元素插入到当前元素之前的所有元素的最后一个大于/小于的位置&#xff0c;其他位置元素依次向后移动&#xff1b; 选择排序&#xff1a;对于每个位置&…

Azure Private endpoint DNS 记录是如何解析的

Private endpoint 从本质上来说是Azure 服务在Azure 虚拟网络中安插的一张带私有地址的网卡。 举例来说如果Storage account在没有绑定private endpoint之前&#xff0c;查询Storage account的DNS记录会是如下情况&#xff1a; Seq Name …

【Linux 基础】常用基础指令(上)

文章目录 一、 创建新用户并设置密码二、ls指令ls指令基本概念ls指令的简写操作 三、pwd指令四、cd指令五、touch指令六、rm指令七、mkdir指令八、rmdir 指令 一、 创建新用户并设置密码 ls /home —— 查看存在多少用户 whoami —— 查看当前用户名 adduser 用户名 —— 创建新…

巨杉数据库携手广发证券入选2023大数据“星河”案例

近期&#xff0c;中国信息通信研究院、中国通信标准化协会大数据技术标准推进委员会(CCSA TC601)连续七年共同组织的大数据“星河&#xff08;Galaxy&#xff09;”案例征集活动发布公示。本次征集活动&#xff0c;旨在通过总结和推广大数据产业发展的优秀成果&#xff0c;推动…

Jenkins邮件推送配置

目录 涉及Jenkins插件&#xff1a; 邮箱配置 什么是授权码 在第三方客户端/服务怎么设置 IMAP/SMTP 设置方法 POP3/SMTP 设置方法 获取授权码&#xff1a; Jenkins配置 从Jenkins主面板System configuration>System进入邮箱配置 在Email Extension Plugin 邮箱插件…

1.22ABM仿真(netlogo),A*(简要)

NETLOGO ABM建模 A* &#xff0c;体现了当前的步数成本 H为启发值&#xff0c;由启发性公式决定&#xff0c; 就是成本F由两个要素确定&#xff0c;一个是实际位置的成本G&#xff0c;由其自身固定的地理位置决定&#xff0c;另一个是启发值H&#xff0c;由下一个位置与目标…

【学网攻】 第(10)节 -- 路由器单臂路由配置

系列文章目录 目录 系列文章目录 文章目录 前言 一、单臂路由是什么&#xff1f; 二、实验 1.引入 实验拓扑图 PC配置 Sw配置 Router配置 实验验证 总结 文章目录 【学网攻】 第(1)节 -- 认识网络【学网攻】 第(2)节 -- 交换机认识及使用【学网攻】 第(3)节 -- 交…

记签名机制

签名过程&#xff1a; 首先将数据源通过摘要算法获取到数字摘要 对数字摘要用私钥进行加密得到签名 将原始消息 以及签名发送给消息接收方 接收方用公钥解密得到数字摘要 用同样的摘要算法将原始消息进行计算 比较得到的数字摘要与解密后的是否一致 Android学习笔记——Androi…

Linux 驱动开发基础知识—— LED 驱动程序框架(四)

个人名片&#xff1a; &#x1f981;作者简介&#xff1a;一名喜欢分享和记录学习的在校大学生 &#x1f42f;个人主页&#xff1a;妄北y &#x1f427;个人QQ&#xff1a;2061314755 &#x1f43b;个人邮箱&#xff1a;2061314755qq.com &#x1f989;个人WeChat&#xff1a;V…