欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

设备树 macb

程序员文章站 2024-01-23 15:03:46
...
* Cadence MACB/GEM Ethernet controller

Required properties:
- compatible: Should be "cdns,[<chip>-]{macb|gem}"
  Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
  Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs or the 10/100Mbit IP
  available on sama5d3 SoCs.
  Use "cdns,np4-macb" for NP4 SoC devices.
  Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
  Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
  the Cadence GEM, or the generic form: "cdns,gem".
  Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs.
  Use "atmel,sama5d3-macb" for the 10/100Mbit IP available on Atmel sama5d3 SoCs.
  Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs.
  Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
  Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
  Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC.
  Or the generic form: "cdns,emac".
- reg: Address and length of the register set for the device
- interrupts: Should contain macb interrupt
- phy-mode: See ethernet.txt file in the same directory.
- clock-names: Tuple listing input clock names.
	Required elements: 'pclk', 'hclk'
	Optional elements: 'tx_clk'
	Optional elements: 'rx_clk' applies to cdns,zynqmp-gem
	Optional elements: 'tsu_clk'
- clocks: Phandles to input clocks.

Optional properties for PHY child node:
- reset-gpios : Should specify the gpio for phy reset
- magic-packet : If present, indicates that the hardware supports waking
  up via magic packet.
- phy-handle : see ethernet.txt file in the same directory

Optional properties:
- tsu-clk: Time stamp unit clock frequency used.
- rx-watermark: Set watermark value for pbuf_rxcutthru reg and enable
  rx partial store and forward, only when compatible = "cdns,zynqmp-gem".
  Value should be less than 0xFFF.

Examples:

	macb0: [email protected] {
		compatible = "cdns,at32ap7000-macb";
		reg = <0xfffc4000 0x4000>;
		interrupts = <21>;
		rx-watermark = /bits/ 16 <0x44>;
		phy-mode = "rmii";
		local-mac-address = [3a 0e 03 04 05 06];
		clock-names = "pclk", "hclk", "tx_clk";
		clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
		[email protected] {
			reg = <0x1>;
			reset-gpios = <&pioE 6 1>;
		};
	};

以下内容是谷歌翻译:

* Cadence MACB / GEM以太网控制器

必需的属性:
-兼容:应为“ cdns,[<chip>-] {macb | gem}”
  使用“ cdns,at91rm9200-emac” Atmel at91rm9200 SoC。
  对Atmel at91sam9 SoC或10 / 100Mbit IP使用“ cdns,at91sam9260-macb”
  在sama5d3 SoC上可用。
  对于NP4 SoC设备使用“ cdns,np4-macb”。
  将“ cdns,at32ap7000-macb”用于其他10/100用法,或使用通用形式:“ cdns,macb”。
  对于基于Picochip picoXcell pc302和更高版本的设备,请使用“ cdns,pc302-gem”
  Cadence GEM或通用形式:“ cdns,gem”。
  对于Atmel sama5d2 SoC上可用的GEM IP(10/100),请使用“ atmel,sama5d2-gem”。
  对于Atmel sama5d3 SoC上可用的10 / 100Mbit IP,请使用“ atmel,sama5d3-macb”。
  对于Atmel sama5d3 SoC上可用的千兆位IP,请使用“ atmel,sama5d3-gem”。
  对于Atmel sama5d4 SoC上可用的GEM IP(10/100),请使用“ atmel,sama5d4-gem”。
  使用“ cdns,zynq-gem” Xilinx Zynq-7xxx SoC。
  对于Zynq Ultrascale + MPSoC使用“ cdns,zynqmp-gem”。
  或通用形式:“ cdns,emac”。
-reg:设备设置的寄存器的地址和长度
-中断:应包含macb中断
-phy模式:请参阅同一目录中的ethernet.txt文件。
-clock-names:元组列出输入时钟名称。
必填元素:“ pclk”,“ hclk”
可选元素:“ tx_clk”
可选元素:“ rx_clk”适用于cdns,zynqmp-gem
可选元素:“ tsu_clk”
-时钟:用于输入时钟的句柄。

PHY子节点的可选属性:
-reset-gpios:应为phy重置指定gpio
-magic-packet:如果存在,则表示硬件支持唤醒
  通过魔术包。
-phy-handle:请参阅同一目录中的ethernet.txt文件

可选属性:
-tsu-clk:使用的时间戳单位时钟频率。
-rx-watermark:设置pbuf_rxcutthru reg的水印值并启用
  仅当compatible =“ cdns,zynqmp-gem”时,rx部分存储和转发。
  值应小于0xFFF。

例子:

macb0:ethernet @ fffc4000 {
兼容=“ cdns,at32ap7000-macb”;
reg = <0xfffc4000 0x4000>;
中断= <21>;
rx-watermark = / bits / 16 <0x44>;
phy-mode =“ rmii”;
local-mac-address = [3a 0e 03 04 05 06];
时钟名称=“ pclk”,“ hclk”,“ tx_clk”;
时钟= <&clkc 30><&clkc 30><&clkc 13>;
ethernet-phy @ 1 {
reg = <0x1>;
reset-gpios = <&pioE 6 1>;
};
};
相关标签: 设备树 Linux