18.12.2018 ZCU104
Материал из SRNS
Lipa (обсуждение | вклад) (Новая страница: «<summary [ hidden ] > _____ _ _ _ _ _ |__ / _ _ __ __ _ | | | | | |_ _ __ __ _ ___ ___…») |
Lipa (обсуждение | вклад) |
||
(не показаны 17 промежуточных версий 1 участника) | |||
Строка 1: | Строка 1: | ||
<summary [ hidden ] > | <summary [ hidden ] > | ||
− | + | ||
− | + | <center>[[File:Ultrascale.png|400px]]</center> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
Сборка PetaLinux для ZCU104 zynq-ultrascale+ | Сборка PetaLinux для ZCU104 zynq-ultrascale+ | ||
</summary> | </summary> | ||
− | |||
− | |||
==Petalinux== | ==Petalinux== | ||
+ | |||
+ | Создать проект petalinux | ||
+ | |||
+ | <source lang="bash"> | ||
+ | $ petalinux-create --type project --template zynqMP --name <PROJECT> | ||
+ | </source> | ||
+ | |||
+ | Для работы eth-phy: | ||
+ | <source lang="bash"> | ||
+ | &gem3{ | ||
+ | status = "okay"; | ||
+ | phy-handle = <&phy0>; | ||
+ | phy-mode = "rgmii-id"; | ||
+ | |||
+ | xlnx,eth-mode = <0x1>; | ||
+ | |||
+ | mdio { | ||
+ | status = "okay"; | ||
+ | #address-cells = <1>; | ||
+ | #size-cells = <0>; | ||
+ | phy0: phy@12 { | ||
+ | compatible = "ethernet-phy-ieee802.3-c22"; | ||
+ | device_type = "ethernet-phy"; | ||
+ | |||
+ | reg = <12>; | ||
+ | ti,rx-internal-delay = <0x7>; | ||
+ | ti,tx-internal-delay = <0x7>; | ||
+ | ti,fifo-depth = <0x01>; | ||
+ | ti,min-output-impedance; | ||
+ | ti,dp83867-rxctrl-strap-quirk; | ||
+ | status = "okay"; | ||
+ | }; | ||
+ | }; | ||
+ | }; | ||
+ | </source> | ||
+ | |||
+ | == patch dev-tree == | ||
+ | [https://www.xilinx.com/support/answers/73086.html ссылка на xilinx раз] | ||
+ | |||
+ | [https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-Building-device-tree-amba-pl-not-found/td-p/1078982 ссылка на xilinx два] | ||
+ | |||
+ | '''device-tree.bbappend:''' | ||
+ | <source lang="bash"> | ||
+ | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
+ | |||
+ | SRC_URI += "file://system-user.dtsi" | ||
+ | |||
+ | SRC_URI_append += " file://0001_disable_gen_axi_interface.patch" | ||
+ | </source> | ||
+ | |||
+ | Кладем патч-файл рядом с system-user.dtsi, правим device-tree.bbappend | ||
+ | |||
+ | == всякое == | ||
+ | |||
+ | [https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-2019-1-fsbl-build-error-fatal-error-xiicps-h-No-such/td-p/1027805 Включаем I2C] | ||
+ | |||
+ | == Настраиваем контроллеры питания == | ||
+ | |||
+ | fsbl шлет по i2c следущее: | ||
+ | |||
+ | <source lang="bash"> | ||
+ | write to 0x44 ack data: 0x00 0x03 # выбрали канал D | ||
+ | write to 0x44 ack data: 0x01 0x80 # сказали ему ON | ||
+ | write to 0x44 ack data: 0x20 0x14 # VOUT 0.2441mV step | ||
+ | write to 0x44 ack data: 0x24 0x00 0x80 # MAX VOUT = 8V | ||
+ | write to 0x44 ack data: 0x21 0x33 0x13 # VOUT = 1.2V | ||
+ | write to 0x44 ack data: 0x42 0xCD 0x15 # VOUT_XXX_LIMIT | ||
+ | write to 0x44 ack data: 0x40 0x66 0x16 # VOUT_XXX_LIMIT | ||
+ | write to 0x44 ack data: 0x43 0xCD 0x10 # VOUT_XXX_LIMIT | ||
+ | write to 0x44 ack data: 0x44 0x00 0x10 # VOUT_XXX_LIMIT | ||
+ | </source> | ||
+ | |||
[[Категория:HOWTO]] | [[Категория:HOWTO]] |
Текущая версия на 12:17, 5 мая 2022
Содержание |
[править] Petalinux
Создать проект petalinux
$ petalinux-create --type project --template zynqMP --name <PROJECT>
Для работы eth-phy:
&gem3{
status = "okay";
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
xlnx,eth-mode = <0x1>;
mdio {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@12 {
compatible = "ethernet-phy-ieee802.3-c22";
device_type = "ethernet-phy";
reg = <12>;
ti,rx-internal-delay = <0x7>;
ti,tx-internal-delay = <0x7>;
ti,fifo-depth = <0x01>;
ti,min-output-impedance;
ti,dp83867-rxctrl-strap-quirk;
status = "okay";
};
};
};
status = "okay";
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
xlnx,eth-mode = <0x1>;
mdio {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@12 {
compatible = "ethernet-phy-ieee802.3-c22";
device_type = "ethernet-phy";
reg = <12>;
ti,rx-internal-delay = <0x7>;
ti,tx-internal-delay = <0x7>;
ti,fifo-depth = <0x01>;
ti,min-output-impedance;
ti,dp83867-rxctrl-strap-quirk;
status = "okay";
};
};
};
[править] patch dev-tree
device-tree.bbappend:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://system-user.dtsi"
SRC_URI_append += " file://0001_disable_gen_axi_interface.patch"
SRC_URI += "file://system-user.dtsi"
SRC_URI_append += " file://0001_disable_gen_axi_interface.patch"
Кладем патч-файл рядом с system-user.dtsi, правим device-tree.bbappend
[править] всякое
[править] Настраиваем контроллеры питания
fsbl шлет по i2c следущее:
write to 0x44 ack data: 0x00 0x03 # выбрали канал D
write to 0x44 ack data: 0x01 0x80 # сказали ему ON
write to 0x44 ack data: 0x20 0x14 # VOUT 0.2441mV step
write to 0x44 ack data: 0x24 0x00 0x80 # MAX VOUT = 8V
write to 0x44 ack data: 0x21 0x33 0x13 # VOUT = 1.2V
write to 0x44 ack data: 0x42 0xCD 0x15 # VOUT_XXX_LIMIT
write to 0x44 ack data: 0x40 0x66 0x16 # VOUT_XXX_LIMIT
write to 0x44 ack data: 0x43 0xCD 0x10 # VOUT_XXX_LIMIT
write to 0x44 ack data: 0x44 0x00 0x10 # VOUT_XXX_LIMIT
write to 0x44 ack data: 0x01 0x80 # сказали ему ON
write to 0x44 ack data: 0x20 0x14 # VOUT 0.2441mV step
write to 0x44 ack data: 0x24 0x00 0x80 # MAX VOUT = 8V
write to 0x44 ack data: 0x21 0x33 0x13 # VOUT = 1.2V
write to 0x44 ack data: 0x42 0xCD 0x15 # VOUT_XXX_LIMIT
write to 0x44 ack data: 0x40 0x66 0x16 # VOUT_XXX_LIMIT
write to 0x44 ack data: 0x43 0xCD 0x10 # VOUT_XXX_LIMIT
write to 0x44 ack data: 0x44 0x00 0x10 # VOUT_XXX_LIMIT
[ Хронологический вид ]Комментарии
Войдите, чтобы комментировать.