···12381238defined; this list will expand as more and more SOC-containing12391239platforms are moved over to use the flattened-device-tree model.1240124012411241- a) PHY nodes12421242-12431243- Required properties:12441244-12451245- - device_type : Should be "ethernet-phy"12461246- - interrupts : <a b> where a is the interrupt number and b is a12471247- field that represents an encoding of the sense and level12481248- information for the interrupt. This should be encoded based on12491249- the information in section 2) depending on the type of interrupt12501250- controller you have.12511251- - interrupt-parent : the phandle for the interrupt controller that12521252- services interrupts for this device.12531253- - reg : The ID number for the phy, usually a small integer12541254- - linux,phandle : phandle for this node; likely referenced by an12551255- ethernet controller node.12561256-12571257-12581258- Example:12591259-12601260- ethernet-phy@0 {12611261- linux,phandle = <2452000>12621262- interrupt-parent = <40000>;12631263- interrupts = <35 1>;12641264- reg = <0>;12651265- device_type = "ethernet-phy";12661266- };12671267-12681268-12691269- b) Interrupt controllers12701270-12711271- Some SOC devices contain interrupt controllers that are different12721272- from the standard Open PIC specification. The SOC device nodes for12731273- these types of controllers should be specified just like a standard12741274- OpenPIC controller. Sense and level information should be encoded12751275- as specified in section 2) of this chapter for each device that12761276- specifies an interrupt.12771277-12781278- Example :12791279-12801280- pic@40000 {12811281- linux,phandle = <40000>;12821282- interrupt-controller;12831283- #address-cells = <0>;12841284- reg = <40000 40000>;12851285- compatible = "chrp,open-pic";12861286- device_type = "open-pic";12871287- };12881288-12891289- c) 4xx/Axon EMAC ethernet nodes12901290-12911291- The EMAC ethernet controller in IBM and AMCC 4xx chips, and also12921292- the Axon bridge. To operate this needs to interact with a ths12931293- special McMAL DMA controller, and sometimes an RGMII or ZMII12941294- interface. In addition to the nodes and properties described12951295- below, the node for the OPB bus on which the EMAC sits must have a12961296- correct clock-frequency property.12971297-12981298- i) The EMAC node itself12991299-13001300- Required properties:13011301- - device_type : "network"13021302-13031303- - compatible : compatible list, contains 2 entries, first is13041304- "ibm,emac-CHIP" where CHIP is the host ASIC (440gx,13051305- 405gp, Axon) and second is either "ibm,emac" or13061306- "ibm,emac4". For Axon, thus, we have: "ibm,emac-axon",13071307- "ibm,emac4"13081308- - interrupts : <interrupt mapping for EMAC IRQ and WOL IRQ>13091309- - interrupt-parent : optional, if needed for interrupt mapping13101310- - reg : <registers mapping>13111311- - local-mac-address : 6 bytes, MAC address13121312- - mal-device : phandle of the associated McMAL node13131313- - mal-tx-channel : 1 cell, index of the tx channel on McMAL associated13141314- with this EMAC13151315- - mal-rx-channel : 1 cell, index of the rx channel on McMAL associated13161316- with this EMAC13171317- - cell-index : 1 cell, hardware index of the EMAC cell on a given13181318- ASIC (typically 0x0 and 0x1 for EMAC0 and EMAC1 on13191319- each Axon chip)13201320- - max-frame-size : 1 cell, maximum frame size supported in bytes13211321- - rx-fifo-size : 1 cell, Rx fifo size in bytes for 10 and 100 Mb/sec13221322- operations.13231323- For Axon, 204813241324- - tx-fifo-size : 1 cell, Tx fifo size in bytes for 10 and 100 Mb/sec13251325- operations.13261326- For Axon, 2048.13271327- - fifo-entry-size : 1 cell, size of a fifo entry (used to calculate13281328- thresholds).13291329- For Axon, 0x0000001013301330- - mal-burst-size : 1 cell, MAL burst size (used to calculate thresholds)13311331- in bytes.13321332- For Axon, 0x00000100 (I think ...)13331333- - phy-mode : string, mode of operations of the PHY interface.13341334- Supported values are: "mii", "rmii", "smii", "rgmii",13351335- "tbi", "gmii", rtbi", "sgmii".13361336- For Axon on CAB, it is "rgmii"13371337- - mdio-device : 1 cell, required iff using shared MDIO registers13381338- (440EP). phandle of the EMAC to use to drive the13391339- MDIO lines for the PHY used by this EMAC.13401340- - zmii-device : 1 cell, required iff connected to a ZMII. phandle of13411341- the ZMII device node13421342- - zmii-channel : 1 cell, required iff connected to a ZMII. Which ZMII13431343- channel or 0xffffffff if ZMII is only used for MDIO.13441344- - rgmii-device : 1 cell, required iff connected to an RGMII. phandle13451345- of the RGMII device node.13461346- For Axon: phandle of plb5/plb4/opb/rgmii13471347- - rgmii-channel : 1 cell, required iff connected to an RGMII. Which13481348- RGMII channel is used by this EMAC.13491349- Fox Axon: present, whatever value is appropriate for each13501350- EMAC, that is the content of the current (bogus) "phy-port"13511351- property.13521352-13531353- Optional properties:13541354- - phy-address : 1 cell, optional, MDIO address of the PHY. If absent,13551355- a search is performed.13561356- - phy-map : 1 cell, optional, bitmap of addresses to probe the PHY13571357- for, used if phy-address is absent. bit 0x00000001 is13581358- MDIO address 0.13591359- For Axon it can be absent, though my current driver13601360- doesn't handle phy-address yet so for now, keep13611361- 0x00ffffff in it.13621362- - rx-fifo-size-gige : 1 cell, Rx fifo size in bytes for 1000 Mb/sec13631363- operations (if absent the value is the same as13641364- rx-fifo-size). For Axon, either absent or 2048.13651365- - tx-fifo-size-gige : 1 cell, Tx fifo size in bytes for 1000 Mb/sec13661366- operations (if absent the value is the same as13671367- tx-fifo-size). For Axon, either absent or 2048.13681368- - tah-device : 1 cell, optional. If connected to a TAH engine for13691369- offload, phandle of the TAH device node.13701370- - tah-channel : 1 cell, optional. If appropriate, channel used on the13711371- TAH engine.13721372-13731373- Example:13741374-13751375- EMAC0: ethernet@40000800 {13761376- device_type = "network";13771377- compatible = "ibm,emac-440gp", "ibm,emac";13781378- interrupt-parent = <&UIC1>;13791379- interrupts = <1c 4 1d 4>;13801380- reg = <40000800 70>;13811381- local-mac-address = [00 04 AC E3 1B 1E];13821382- mal-device = <&MAL0>;13831383- mal-tx-channel = <0 1>;13841384- mal-rx-channel = <0>;13851385- cell-index = <0>;13861386- max-frame-size = <5dc>;13871387- rx-fifo-size = <1000>;13881388- tx-fifo-size = <800>;13891389- phy-mode = "rmii";13901390- phy-map = <00000001>;13911391- zmii-device = <&ZMII0>;13921392- zmii-channel = <0>;13931393- };13941394-13951395- ii) McMAL node13961396-13971397- Required properties:13981398- - device_type : "dma-controller"13991399- - compatible : compatible list, containing 2 entries, first is14001400- "ibm,mcmal-CHIP" where CHIP is the host ASIC (like14011401- emac) and the second is either "ibm,mcmal" or14021402- "ibm,mcmal2".14031403- For Axon, "ibm,mcmal-axon","ibm,mcmal2"14041404- - interrupts : <interrupt mapping for the MAL interrupts sources:14051405- 5 sources: tx_eob, rx_eob, serr, txde, rxde>.14061406- For Axon: This is _different_ from the current14071407- firmware. We use the "delayed" interrupts for txeob14081408- and rxeob. Thus we end up with mapping those 5 MPIC14091409- interrupts, all level positive sensitive: 10, 11, 32,14101410- 33, 34 (in decimal)14111411- - dcr-reg : < DCR registers range >14121412- - dcr-parent : if needed for dcr-reg14131413- - num-tx-chans : 1 cell, number of Tx channels14141414- - num-rx-chans : 1 cell, number of Rx channels14151415-14161416- iii) ZMII node14171417-14181418- Required properties:14191419- - compatible : compatible list, containing 2 entries, first is14201420- "ibm,zmii-CHIP" where CHIP is the host ASIC (like14211421- EMAC) and the second is "ibm,zmii".14221422- For Axon, there is no ZMII node.14231423- - reg : <registers mapping>14241424-14251425- iv) RGMII node14261426-14271427- Required properties:14281428- - compatible : compatible list, containing 2 entries, first is14291429- "ibm,rgmii-CHIP" where CHIP is the host ASIC (like14301430- EMAC) and the second is "ibm,rgmii".14311431- For Axon, "ibm,rgmii-axon","ibm,rgmii"14321432- - reg : <registers mapping>14331433- - revision : as provided by the RGMII new version register if14341434- available.14351435- For Axon: 0x0000012a14361436-14371437- d) Xilinx IP cores14381438-14391439- The Xilinx EDK toolchain ships with a set of IP cores (devices) for use14401440- in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range14411441- of standard device types (network, serial, etc.) and miscellaneous14421442- devices (gpio, LCD, spi, etc). Also, since these devices are14431443- implemented within the fpga fabric every instance of the device can be14441444- synthesised with different options that change the behaviour.14451445-14461446- Each IP-core has a set of parameters which the FPGA designer can use to14471447- control how the core is synthesized. Historically, the EDK tool would14481448- extract the device parameters relevant to device drivers and copy them14491449- into an 'xparameters.h' in the form of #define symbols. This tells the14501450- device drivers how the IP cores are configured, but it requres the kernel14511451- to be recompiled every time the FPGA bitstream is resynthesized.14521452-14531453- The new approach is to export the parameters into the device tree and14541454- generate a new device tree each time the FPGA bitstream changes. The14551455- parameters which used to be exported as #defines will now become14561456- properties of the device node. In general, device nodes for IP-cores14571457- will take the following form:14581458-14591459- (name): (generic-name)@(base-address) {14601460- compatible = "xlnx,(ip-core-name)-(HW_VER)"14611461- [, (list of compatible devices), ...];14621462- reg = <(baseaddr) (size)>;14631463- interrupt-parent = <&interrupt-controller-phandle>;14641464- interrupts = < ... >;14651465- xlnx,(parameter1) = "(string-value)";14661466- xlnx,(parameter2) = <(int-value)>;14671467- };14681468-14691469- (generic-name): an open firmware-style name that describes the14701470- generic class of device. Preferably, this is one word, such14711471- as 'serial' or 'ethernet'.14721472- (ip-core-name): the name of the ip block (given after the BEGIN14731473- directive in system.mhs). Should be in lowercase14741474- and all underscores '_' converted to dashes '-'.14751475- (name): is derived from the "PARAMETER INSTANCE" value.14761476- (parameter#): C_* parameters from system.mhs. The C_ prefix is14771477- dropped from the parameter name, the name is converted14781478- to lowercase and all underscore '_' characters are14791479- converted to dashes '-'.14801480- (baseaddr): the baseaddr parameter value (often named C_BASEADDR).14811481- (HW_VER): from the HW_VER parameter.14821482- (size): the address range size (often C_HIGHADDR - C_BASEADDR + 1).14831483-14841484- Typically, the compatible list will include the exact IP core version14851485- followed by an older IP core version which implements the same14861486- interface or any other device with the same interface.14871487-14881488- 'reg', 'interrupt-parent' and 'interrupts' are all optional properties.14891489-14901490- For example, the following block from system.mhs:14911491-14921492- BEGIN opb_uartlite14931493- PARAMETER INSTANCE = opb_uartlite_014941494- PARAMETER HW_VER = 1.00.b14951495- PARAMETER C_BAUDRATE = 11520014961496- PARAMETER C_DATA_BITS = 814971497- PARAMETER C_ODD_PARITY = 014981498- PARAMETER C_USE_PARITY = 014991499- PARAMETER C_CLK_FREQ = 5000000015001500- PARAMETER C_BASEADDR = 0xEC10000015011501- PARAMETER C_HIGHADDR = 0xEC10FFFF15021502- BUS_INTERFACE SOPB = opb_715031503- PORT OPB_Clk = CLK_50MHz15041504- PORT Interrupt = opb_uartlite_0_Interrupt15051505- PORT RX = opb_uartlite_0_RX15061506- PORT TX = opb_uartlite_0_TX15071507- PORT OPB_Rst = sys_bus_reset_015081508- END15091509-15101510- becomes the following device tree node:15111511-15121512- opb_uartlite_0: serial@ec100000 {15131513- device_type = "serial";15141514- compatible = "xlnx,opb-uartlite-1.00.b";15151515- reg = <ec100000 10000>;15161516- interrupt-parent = <&opb_intc_0>;15171517- interrupts = <1 0>; // got this from the opb_intc parameters15181518- current-speed = <d#115200>; // standard serial device prop15191519- clock-frequency = <d#50000000>; // standard serial device prop15201520- xlnx,data-bits = <8>;15211521- xlnx,odd-parity = <0>;15221522- xlnx,use-parity = <0>;15231523- };15241524-15251525- Some IP cores actually implement 2 or more logical devices. In15261526- this case, the device should still describe the whole IP core with15271527- a single node and add a child node for each logical device. The15281528- ranges property can be used to translate from parent IP-core to the15291529- registers of each device. In addition, the parent node should be15301530- compatible with the bus type 'xlnx,compound', and should contain15311531- #address-cells and #size-cells, as with any other bus. (Note: this15321532- makes the assumption that both logical devices have the same bus15331533- binding. If this is not true, then separate nodes should be used15341534- for each logical device). The 'cell-index' property can be used to15351535- enumerate logical devices within an IP core. For example, the15361536- following is the system.mhs entry for the dual ps2 controller found15371537- on the ml403 reference design.15381538-15391539- BEGIN opb_ps2_dual_ref15401540- PARAMETER INSTANCE = opb_ps2_dual_ref_015411541- PARAMETER HW_VER = 1.00.a15421542- PARAMETER C_BASEADDR = 0xA900000015431543- PARAMETER C_HIGHADDR = 0xA9001FFF15441544- BUS_INTERFACE SOPB = opb_v20_015451545- PORT Sys_Intr1 = ps2_1_intr15461546- PORT Sys_Intr2 = ps2_2_intr15471547- PORT Clkin1 = ps2_clk_rx_115481548- PORT Clkin2 = ps2_clk_rx_215491549- PORT Clkpd1 = ps2_clk_tx_115501550- PORT Clkpd2 = ps2_clk_tx_215511551- PORT Rx1 = ps2_d_rx_115521552- PORT Rx2 = ps2_d_rx_215531553- PORT Txpd1 = ps2_d_tx_115541554- PORT Txpd2 = ps2_d_tx_215551555- END15561556-15571557- It would result in the following device tree nodes:15581558-15591559- opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {15601560- #address-cells = <1>;15611561- #size-cells = <1>;15621562- compatible = "xlnx,compound";15631563- ranges = <0 a9000000 2000>;15641564- // If this device had extra parameters, then they would15651565- // go here.15661566- ps2@0 {15671567- compatible = "xlnx,opb-ps2-dual-ref-1.00.a";15681568- reg = <0 40>;15691569- interrupt-parent = <&opb_intc_0>;15701570- interrupts = <3 0>;15711571- cell-index = <0>;15721572- };15731573- ps2@1000 {15741574- compatible = "xlnx,opb-ps2-dual-ref-1.00.a";15751575- reg = <1000 40>;15761576- interrupt-parent = <&opb_intc_0>;15771577- interrupts = <3 0>;15781578- cell-index = <0>;15791579- };15801580- };15811581-15821582- Also, the system.mhs file defines bus attachments from the processor15831583- to the devices. The device tree structure should reflect the bus15841584- attachments. Again an example; this system.mhs fragment:15851585-15861586- BEGIN ppc405_virtex415871587- PARAMETER INSTANCE = ppc405_015881588- PARAMETER HW_VER = 1.01.a15891589- BUS_INTERFACE DPLB = plb_v34_015901590- BUS_INTERFACE IPLB = plb_v34_015911591- END15921592-15931593- BEGIN opb_intc15941594- PARAMETER INSTANCE = opb_intc_015951595- PARAMETER HW_VER = 1.00.c15961596- PARAMETER C_BASEADDR = 0xD1000FC015971597- PARAMETER C_HIGHADDR = 0xD1000FDF15981598- BUS_INTERFACE SOPB = opb_v20_015991599- END16001600-16011601- BEGIN opb_uart1655016021602- PARAMETER INSTANCE = opb_uart16550_016031603- PARAMETER HW_VER = 1.00.d16041604- PARAMETER C_BASEADDR = 0xa000000016051605- PARAMETER C_HIGHADDR = 0xa0001FFF16061606- BUS_INTERFACE SOPB = opb_v20_016071607- END16081608-16091609- BEGIN plb_v3416101610- PARAMETER INSTANCE = plb_v34_016111611- PARAMETER HW_VER = 1.02.a16121612- END16131613-16141614- BEGIN plb_bram_if_cntlr16151615- PARAMETER INSTANCE = plb_bram_if_cntlr_016161616- PARAMETER HW_VER = 1.00.b16171617- PARAMETER C_BASEADDR = 0xFFFF000016181618- PARAMETER C_HIGHADDR = 0xFFFFFFFF16191619- BUS_INTERFACE SPLB = plb_v34_016201620- END16211621-16221622- BEGIN plb2opb_bridge16231623- PARAMETER INSTANCE = plb2opb_bridge_016241624- PARAMETER HW_VER = 1.01.a16251625- PARAMETER C_RNG0_BASEADDR = 0x2000000016261626- PARAMETER C_RNG0_HIGHADDR = 0x3FFFFFFF16271627- PARAMETER C_RNG1_BASEADDR = 0x6000000016281628- PARAMETER C_RNG1_HIGHADDR = 0x7FFFFFFF16291629- PARAMETER C_RNG2_BASEADDR = 0x8000000016301630- PARAMETER C_RNG2_HIGHADDR = 0xBFFFFFFF16311631- PARAMETER C_RNG3_BASEADDR = 0xC000000016321632- PARAMETER C_RNG3_HIGHADDR = 0xDFFFFFFF16331633- BUS_INTERFACE SPLB = plb_v34_016341634- BUS_INTERFACE MOPB = opb_v20_016351635- END16361636-16371637- Gives this device tree (some properties removed for clarity):16381638-16391639- plb@0 {16401640- #address-cells = <1>;16411641- #size-cells = <1>;16421642- compatible = "xlnx,plb-v34-1.02.a";16431643- device_type = "ibm,plb";16441644- ranges; // 1:1 translation16451645-16461646- plb_bram_if_cntrl_0: bram@ffff0000 {16471647- reg = <ffff0000 10000>;16481648- }16491649-16501650- opb@20000000 {16511651- #address-cells = <1>;16521652- #size-cells = <1>;16531653- ranges = <20000000 20000000 2000000016541654- 60000000 60000000 2000000016551655- 80000000 80000000 4000000016561656- c0000000 c0000000 20000000>;16571657-16581658- opb_uart16550_0: serial@a0000000 {16591659- reg = <a00000000 2000>;16601660- };16611661-16621662- opb_intc_0: interrupt-controller@d1000fc0 {16631663- reg = <d1000fc0 20>;16641664- };16651665- };16661666- };16671667-16681668- That covers the general approach to binding xilinx IP cores into the16691669- device tree. The following are bindings for specific devices:16701670-16711671- i) Xilinx ML300 Framebuffer16721672-16731673- Simple framebuffer device from the ML300 reference design (also on the16741674- ML403 reference design as well as others).16751675-16761676- Optional properties:16771677- - resolution = <xres yres> : pixel resolution of framebuffer. Some16781678- implementations use a different resolution.16791679- Default is <d#640 d#480>16801680- - virt-resolution = <xvirt yvirt> : Size of framebuffer in memory.16811681- Default is <d#1024 d#480>.16821682- - rotate-display (empty) : rotate display 180 degrees.16831683-16841684- ii) Xilinx SystemACE16851685-16861686- The Xilinx SystemACE device is used to program FPGAs from an FPGA16871687- bitstream stored on a CF card. It can also be used as a generic CF16881688- interface device.16891689-16901690- Optional properties:16911691- - 8-bit (empty) : Set this property for SystemACE in 8 bit mode16921692-16931693- iii) Xilinx EMAC and Xilinx TEMAC16941694-16951695- Xilinx Ethernet devices. In addition to general xilinx properties16961696- listed above, nodes for these devices should include a phy-handle16971697- property, and may include other common network device properties16981698- like local-mac-address.16991699-17001700- iv) Xilinx Uartlite17011701-17021702- Xilinx uartlite devices are simple fixed speed serial ports.17031703-17041704- Required properties:17051705- - current-speed : Baud rate of uartlite17061706-17071707- v) Xilinx hwicap17081708-17091709- Xilinx hwicap devices provide access to the configuration logic17101710- of the FPGA through the Internal Configuration Access Port17111711- (ICAP). The ICAP enables partial reconfiguration of the FPGA,17121712- readback of the configuration information, and some control over17131713- 'warm boots' of the FPGA fabric.17141714-17151715- Required properties:17161716- - xlnx,family : The family of the FPGA, necessary since the17171717- capabilities of the underlying ICAP hardware17181718- differ between different families. May be17191719- 'virtex2p', 'virtex4', or 'virtex5'.17201720-17211721- vi) Xilinx Uart 1655017221722-17231723- Xilinx UART 16550 devices are very similar to the NS16550 but with17241724- different register spacing and an offset from the base address.17251725-17261726- Required properties:17271727- - clock-frequency : Frequency of the clock input17281728- - reg-offset : A value of 3 is required17291729- - reg-shift : A value of 2 is required17301730-17311731- e) USB EHCI controllers17321732-17331733- Required properties:17341734- - compatible : should be "usb-ehci".17351735- - reg : should contain at least address and length of the standard EHCI17361736- register set for the device. Optional platform-dependent registers17371737- (debug-port or other) can be also specified here, but only after17381738- definition of standard EHCI registers.17391739- - interrupts : one EHCI interrupt should be described here.17401740- If device registers are implemented in big endian mode, the device17411741- node should have "big-endian-regs" property.17421742- If controller implementation operates with big endian descriptors,17431743- "big-endian-desc" property should be specified.17441744- If both big endian registers and descriptors are used by the controller17451745- implementation, "big-endian" property can be specified instead of having17461746- both "big-endian-regs" and "big-endian-desc".17471747-17481748- Example (Sequoia 440EPx):17491749- ehci@e0000300 {17501750- compatible = "ibm,usb-ehci-440epx", "usb-ehci";17511751- interrupt-parent = <&UIC0>;17521752- interrupts = <1a 4>;17531753- reg = <0 e0000300 90 0 e0000390 70>;17541754- big-endian;17551755- };17561756-17571757- f) MDIO on GPIOs17581758-17591759- Currently defined compatibles:17601760- - virtual,gpio-mdio17611761-17621762- MDC and MDIO lines connected to GPIO controllers are listed in the17631763- gpios property as described in section VIII.1 in the following order:17641764-17651765- MDC, MDIO.17661766-17671767- Example:17681768-17691769- mdio {17701770- compatible = "virtual,mdio-gpio";17711771- #address-cells = <1>;17721772- #size-cells = <0>;17731773- gpios = <&qe_pio_a 1117741774- &qe_pio_c 6>;17751775- };17761776-17771777- g) SPI (Serial Peripheral Interface) busses17781778-17791779- SPI busses can be described with a node for the SPI master device17801780- and a set of child nodes for each SPI slave on the bus. For this17811781- discussion, it is assumed that the system's SPI controller is in17821782- SPI master mode. This binding does not describe SPI controllers17831783- in slave mode.17841784-17851785- The SPI master node requires the following properties:17861786- - #address-cells - number of cells required to define a chip select17871787- address on the SPI bus.17881788- - #size-cells - should be zero.17891789- - compatible - name of SPI bus controller following generic names17901790- recommended practice.17911791- No other properties are required in the SPI bus node. It is assumed17921792- that a driver for an SPI bus device will understand that it is an SPI bus.17931793- However, the binding does not attempt to define the specific method for17941794- assigning chip select numbers. Since SPI chip select configuration is17951795- flexible and non-standardized, it is left out of this binding with the17961796- assumption that board specific platform code will be used to manage17971797- chip selects. Individual drivers can define additional properties to17981798- support describing the chip select layout.17991799-18001800- SPI slave nodes must be children of the SPI master node and can18011801- contain the following properties.18021802- - reg - (required) chip select address of device.18031803- - compatible - (required) name of SPI device following generic names18041804- recommended practice18051805- - spi-max-frequency - (required) Maximum SPI clocking speed of device in Hz18061806- - spi-cpol - (optional) Empty property indicating device requires18071807- inverse clock polarity (CPOL) mode18081808- - spi-cpha - (optional) Empty property indicating device requires18091809- shifted clock phase (CPHA) mode18101810- - spi-cs-high - (optional) Empty property indicating device requires18111811- chip select active high18121812-18131813- SPI example for an MPC5200 SPI bus:18141814- spi@f00 {18151815- #address-cells = <1>;18161816- #size-cells = <0>;18171817- compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";18181818- reg = <0xf00 0x20>;18191819- interrupts = <2 13 0 2 14 0>;18201820- interrupt-parent = <&mpc5200_pic>;18211821-18221822- ethernet-switch@0 {18231823- compatible = "micrel,ks8995m";18241824- spi-max-frequency = <1000000>;18251825- reg = <0>;18261826- };18271827-18281828- codec@1 {18291829- compatible = "ti,tlv320aic26";18301830- spi-max-frequency = <100000>;18311831- reg = <1>;18321832- };18331833- };18341834-18351835-VII - Marvell Discovery mv64[345]6x System Controller chips18361836-===========================================================18371837-18381838-The Marvell mv64[345]60 series of system controller chips contain18391839-many of the peripherals needed to implement a complete computer18401840-system. In this section, we define device tree nodes to describe18411841-the system controller chip itself and each of the peripherals18421842-which it contains. Compatible string values for each node are18431843-prefixed with the string "marvell,", for Marvell Technology Group Ltd.18441844-18451845-1) The /system-controller node18461846-18471847- This node is used to represent the system-controller and must be18481848- present when the system uses a system controller chip. The top-level18491849- system-controller node contains information that is global to all18501850- devices within the system controller chip. The node name begins18511851- with "system-controller" followed by the unit address, which is18521852- the base address of the memory-mapped register set for the system18531853- controller chip.18541854-18551855- Required properties:18561856-18571857- - ranges : Describes the translation of system controller addresses18581858- for memory mapped registers.18591859- - clock-frequency: Contains the main clock frequency for the system18601860- controller chip.18611861- - reg : This property defines the address and size of the18621862- memory-mapped registers contained within the system controller18631863- chip. The address specified in the "reg" property should match18641864- the unit address of the system-controller node.18651865- - #address-cells : Address representation for system controller18661866- devices. This field represents the number of cells needed to18671867- represent the address of the memory-mapped registers of devices18681868- within the system controller chip.18691869- - #size-cells : Size representation for for the memory-mapped18701870- registers within the system controller chip.18711871- - #interrupt-cells : Defines the width of cells used to represent18721872- interrupts.18731873-18741874- Optional properties:18751875-18761876- - model : The specific model of the system controller chip. Such18771877- as, "mv64360", "mv64460", or "mv64560".18781878- - compatible : A string identifying the compatibility identifiers18791879- of the system controller chip.18801880-18811881- The system-controller node contains child nodes for each system18821882- controller device that the platform uses. Nodes should not be created18831883- for devices which exist on the system controller chip but are not used18841884-18851885- Example Marvell Discovery mv64360 system-controller node:18861886-18871887- system-controller@f1000000 { /* Marvell Discovery mv64360 */18881888- #address-cells = <1>;18891889- #size-cells = <1>;18901890- model = "mv64360"; /* Default */18911891- compatible = "marvell,mv64360";18921892- clock-frequency = <133333333>;18931893- reg = <0xf1000000 0x10000>;18941894- virtual-reg = <0xf1000000>;18951895- ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */18961896- 0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */18971897- 0xa0000000 0xa0000000 0x4000000 /* User FLASH */18981898- 0x00000000 0xf1000000 0x0010000 /* Bridge's regs */18991899- 0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */19001900-19011901- [ child node definitions... ]19021902- }19031903-19041904-2) Child nodes of /system-controller19051905-19061906- a) Marvell Discovery MDIO bus19071907-19081908- The MDIO is a bus to which the PHY devices are connected. For each19091909- device that exists on this bus, a child node should be created. See19101910- the definition of the PHY node below for an example of how to define19111911- a PHY.19121912-19131913- Required properties:19141914- - #address-cells : Should be <1>19151915- - #size-cells : Should be <0>19161916- - device_type : Should be "mdio"19171917- - compatible : Should be "marvell,mv64360-mdio"19181918-19191919- Example:19201920-19211921- mdio {19221922- #address-cells = <1>;19231923- #size-cells = <0>;19241924- device_type = "mdio";19251925- compatible = "marvell,mv64360-mdio";19261926-19271927- ethernet-phy@0 {19281928- ......19291929- };19301930- };19311931-19321932-19331933- b) Marvell Discovery ethernet controller19341934-19351935- The Discover ethernet controller is described with two levels19361936- of nodes. The first level describes an ethernet silicon block19371937- and the second level describes up to 3 ethernet nodes within19381938- that block. The reason for the multiple levels is that the19391939- registers for the node are interleaved within a single set19401940- of registers. The "ethernet-block" level describes the19411941- shared register set, and the "ethernet" nodes describe ethernet19421942- port-specific properties.19431943-19441944- Ethernet block node19451945-19461946- Required properties:19471947- - #address-cells : <1>19481948- - #size-cells : <0>19491949- - compatible : "marvell,mv64360-eth-block"19501950- - reg : Offset and length of the register set for this block19511951-19521952- Example Discovery Ethernet block node:19531953- ethernet-block@2000 {19541954- #address-cells = <1>;19551955- #size-cells = <0>;19561956- compatible = "marvell,mv64360-eth-block";19571957- reg = <0x2000 0x2000>;19581958- ethernet@0 {19591959- .......19601960- };19611961- };19621962-19631963- Ethernet port node19641964-19651965- Required properties:19661966- - device_type : Should be "network".19671967- - compatible : Should be "marvell,mv64360-eth".19681968- - reg : Should be <0>, <1>, or <2>, according to which registers19691969- within the silicon block the device uses.19701970- - interrupts : <a> where a is the interrupt number for the port.19711971- - interrupt-parent : the phandle for the interrupt controller19721972- that services interrupts for this device.19731973- - phy : the phandle for the PHY connected to this ethernet19741974- controller.19751975- - local-mac-address : 6 bytes, MAC address19761976-19771977- Example Discovery Ethernet port node:19781978- ethernet@0 {19791979- device_type = "network";19801980- compatible = "marvell,mv64360-eth";19811981- reg = <0>;19821982- interrupts = <32>;19831983- interrupt-parent = <&PIC>;19841984- phy = <&PHY0>;19851985- local-mac-address = [ 00 00 00 00 00 00 ];19861986- };19871987-19881988-19891989-19901990- c) Marvell Discovery PHY nodes19911991-19921992- Required properties:19931993- - device_type : Should be "ethernet-phy"19941994- - interrupts : <a> where a is the interrupt number for this phy.19951995- - interrupt-parent : the phandle for the interrupt controller that19961996- services interrupts for this device.19971997- - reg : The ID number for the phy, usually a small integer19981998-19991999- Example Discovery PHY node:20002000- ethernet-phy@1 {20012001- device_type = "ethernet-phy";20022002- compatible = "broadcom,bcm5421";20032003- interrupts = <76>; /* GPP 12 */20042004- interrupt-parent = <&PIC>;20052005- reg = <1>;20062006- };20072007-20082008-20092009- d) Marvell Discovery SDMA nodes20102010-20112011- Represent DMA hardware associated with the MPSC (multiprotocol20122012- serial controllers).20132013-20142014- Required properties:20152015- - compatible : "marvell,mv64360-sdma"20162016- - reg : Offset and length of the register set for this device20172017- - interrupts : <a> where a is the interrupt number for the DMA20182018- device.20192019- - interrupt-parent : the phandle for the interrupt controller20202020- that services interrupts for this device.20212021-20222022- Example Discovery SDMA node:20232023- sdma@4000 {20242024- compatible = "marvell,mv64360-sdma";20252025- reg = <0x4000 0xc18>;20262026- virtual-reg = <0xf1004000>;20272027- interrupts = <36>;20282028- interrupt-parent = <&PIC>;20292029- };20302030-20312031-20322032- e) Marvell Discovery BRG nodes20332033-20342034- Represent baud rate generator hardware associated with the MPSC20352035- (multiprotocol serial controllers).20362036-20372037- Required properties:20382038- - compatible : "marvell,mv64360-brg"20392039- - reg : Offset and length of the register set for this device20402040- - clock-src : A value from 0 to 15 which selects the clock20412041- source for the baud rate generator. This value corresponds20422042- to the CLKS value in the BRGx configuration register. See20432043- the mv64x60 User's Manual.20442044- - clock-frequence : The frequency (in Hz) of the baud rate20452045- generator's input clock.20462046- - current-speed : The current speed setting (presumably by20472047- firmware) of the baud rate generator.20482048-20492049- Example Discovery BRG node:20502050- brg@b200 {20512051- compatible = "marvell,mv64360-brg";20522052- reg = <0xb200 0x8>;20532053- clock-src = <8>;20542054- clock-frequency = <133333333>;20552055- current-speed = <9600>;20562056- };20572057-20582058-20592059- f) Marvell Discovery CUNIT nodes20602060-20612061- Represent the Serial Communications Unit device hardware.20622062-20632063- Required properties:20642064- - reg : Offset and length of the register set for this device20652065-20662066- Example Discovery CUNIT node:20672067- cunit@f200 {20682068- reg = <0xf200 0x200>;20692069- };20702070-20712071-20722072- g) Marvell Discovery MPSCROUTING nodes20732073-20742074- Represent the Discovery's MPSC routing hardware20752075-20762076- Required properties:20772077- - reg : Offset and length of the register set for this device20782078-20792079- Example Discovery CUNIT node:20802080- mpscrouting@b500 {20812081- reg = <0xb400 0xc>;20822082- };20832083-20842084-20852085- h) Marvell Discovery MPSCINTR nodes20862086-20872087- Represent the Discovery's MPSC DMA interrupt hardware registers20882088- (SDMA cause and mask registers).20892089-20902090- Required properties:20912091- - reg : Offset and length of the register set for this device20922092-20932093- Example Discovery MPSCINTR node:20942094- mpsintr@b800 {20952095- reg = <0xb800 0x100>;20962096- };20972097-20982098-20992099- i) Marvell Discovery MPSC nodes21002100-21012101- Represent the Discovery's MPSC (Multiprotocol Serial Controller)21022102- serial port.21032103-21042104- Required properties:21052105- - device_type : "serial"21062106- - compatible : "marvell,mv64360-mpsc"21072107- - reg : Offset and length of the register set for this device21082108- - sdma : the phandle for the SDMA node used by this port21092109- - brg : the phandle for the BRG node used by this port21102110- - cunit : the phandle for the CUNIT node used by this port21112111- - mpscrouting : the phandle for the MPSCROUTING node used by this port21122112- - mpscintr : the phandle for the MPSCINTR node used by this port21132113- - cell-index : the hardware index of this cell in the MPSC core21142114- - max_idle : value needed for MPSC CHR3 (Maximum Frame Length)21152115- register21162116- - interrupts : <a> where a is the interrupt number for the MPSC.21172117- - interrupt-parent : the phandle for the interrupt controller21182118- that services interrupts for this device.21192119-21202120- Example Discovery MPSCINTR node:21212121- mpsc@8000 {21222122- device_type = "serial";21232123- compatible = "marvell,mv64360-mpsc";21242124- reg = <0x8000 0x38>;21252125- virtual-reg = <0xf1008000>;21262126- sdma = <&SDMA0>;21272127- brg = <&BRG0>;21282128- cunit = <&CUNIT>;21292129- mpscrouting = <&MPSCROUTING>;21302130- mpscintr = <&MPSCINTR>;21312131- cell-index = <0>;21322132- max_idle = <40>;21332133- interrupts = <40>;21342134- interrupt-parent = <&PIC>;21352135- };21362136-21372137-21382138- j) Marvell Discovery Watch Dog Timer nodes21392139-21402140- Represent the Discovery's watchdog timer hardware21412141-21422142- Required properties:21432143- - compatible : "marvell,mv64360-wdt"21442144- - reg : Offset and length of the register set for this device21452145-21462146- Example Discovery Watch Dog Timer node:21472147- wdt@b410 {21482148- compatible = "marvell,mv64360-wdt";21492149- reg = <0xb410 0x8>;21502150- };21512151-21522152-21532153- k) Marvell Discovery I2C nodes21542154-21552155- Represent the Discovery's I2C hardware21562156-21572157- Required properties:21582158- - device_type : "i2c"21592159- - compatible : "marvell,mv64360-i2c"21602160- - reg : Offset and length of the register set for this device21612161- - interrupts : <a> where a is the interrupt number for the I2C.21622162- - interrupt-parent : the phandle for the interrupt controller21632163- that services interrupts for this device.21642164-21652165- Example Discovery I2C node:21662166- compatible = "marvell,mv64360-i2c";21672167- reg = <0xc000 0x20>;21682168- virtual-reg = <0xf100c000>;21692169- interrupts = <37>;21702170- interrupt-parent = <&PIC>;21712171- };21722172-21732173-21742174- l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes21752175-21762176- Represent the Discovery's PIC hardware21772177-21782178- Required properties:21792179- - #interrupt-cells : <1>21802180- - #address-cells : <0>21812181- - compatible : "marvell,mv64360-pic"21822182- - reg : Offset and length of the register set for this device21832183- - interrupt-controller21842184-21852185- Example Discovery PIC node:21862186- pic {21872187- #interrupt-cells = <1>;21882188- #address-cells = <0>;21892189- compatible = "marvell,mv64360-pic";21902190- reg = <0x0 0x88>;21912191- interrupt-controller;21922192- };21932193-21942194-21952195- m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes21962196-21972197- Represent the Discovery's MPP hardware21982198-21992199- Required properties:22002200- - compatible : "marvell,mv64360-mpp"22012201- - reg : Offset and length of the register set for this device22022202-22032203- Example Discovery MPP node:22042204- mpp@f000 {22052205- compatible = "marvell,mv64360-mpp";22062206- reg = <0xf000 0x10>;22072207- };22082208-22092209-22102210- n) Marvell Discovery GPP (General Purpose Pins) nodes22112211-22122212- Represent the Discovery's GPP hardware22132213-22142214- Required properties:22152215- - compatible : "marvell,mv64360-gpp"22162216- - reg : Offset and length of the register set for this device22172217-22182218- Example Discovery GPP node:22192219- gpp@f000 {22202220- compatible = "marvell,mv64360-gpp";22212221- reg = <0xf100 0x20>;22222222- };22232223-22242224-22252225- o) Marvell Discovery PCI host bridge node22262226-22272227- Represents the Discovery's PCI host bridge device. The properties22282228- for this node conform to Rev 2.1 of the PCI Bus Binding to IEEE22292229- 1275-1994. A typical value for the compatible property is22302230- "marvell,mv64360-pci".22312231-22322232- Example Discovery PCI host bridge node22332233- pci@80000000 {22342234- #address-cells = <3>;22352235- #size-cells = <2>;22362236- #interrupt-cells = <1>;22372237- device_type = "pci";22382238- compatible = "marvell,mv64360-pci";22392239- reg = <0xcf8 0x8>;22402240- ranges = <0x01000000 0x0 0x022412241- 0x88000000 0x0 0x0100000022422242- 0x02000000 0x0 0x8000000022432243- 0x80000000 0x0 0x08000000>;22442244- bus-range = <0 255>;22452245- clock-frequency = <66000000>;22462246- interrupt-parent = <&PIC>;22472247- interrupt-map-mask = <0xf800 0x0 0x0 0x7>;22482248- interrupt-map = <22492249- /* IDSEL 0x0a */22502250- 0x5000 0 0 1 &PIC 8022512251- 0x5000 0 0 2 &PIC 8122522252- 0x5000 0 0 3 &PIC 9122532253- 0x5000 0 0 4 &PIC 9322542254-22552255- /* IDSEL 0x0b */22562256- 0x5800 0 0 1 &PIC 9122572257- 0x5800 0 0 2 &PIC 9322582258- 0x5800 0 0 3 &PIC 8022592259- 0x5800 0 0 4 &PIC 8122602260-22612261- /* IDSEL 0x0c */22622262- 0x6000 0 0 1 &PIC 9122632263- 0x6000 0 0 2 &PIC 9322642264- 0x6000 0 0 3 &PIC 8022652265- 0x6000 0 0 4 &PIC 8122662266-22672267- /* IDSEL 0x0d */22682268- 0x6800 0 0 1 &PIC 9322692269- 0x6800 0 0 2 &PIC 8022702270- 0x6800 0 0 3 &PIC 8122712271- 0x6800 0 0 4 &PIC 9122722272- >;22732273- };22742274-22752275-22762276- p) Marvell Discovery CPU Error nodes22772277-22782278- Represent the Discovery's CPU error handler device.22792279-22802280- Required properties:22812281- - compatible : "marvell,mv64360-cpu-error"22822282- - reg : Offset and length of the register set for this device22832283- - interrupts : the interrupt number for this device22842284- - interrupt-parent : the phandle for the interrupt controller22852285- that services interrupts for this device.22862286-22872287- Example Discovery CPU Error node:22882288- cpu-error@0070 {22892289- compatible = "marvell,mv64360-cpu-error";22902290- reg = <0x70 0x10 0x128 0x28>;22912291- interrupts = <3>;22922292- interrupt-parent = <&PIC>;22932293- };22942294-22952295-22962296- q) Marvell Discovery SRAM Controller nodes22972297-22982298- Represent the Discovery's SRAM controller device.22992299-23002300- Required properties:23012301- - compatible : "marvell,mv64360-sram-ctrl"23022302- - reg : Offset and length of the register set for this device23032303- - interrupts : the interrupt number for this device23042304- - interrupt-parent : the phandle for the interrupt controller23052305- that services interrupts for this device.23062306-23072307- Example Discovery SRAM Controller node:23082308- sram-ctrl@0380 {23092309- compatible = "marvell,mv64360-sram-ctrl";23102310- reg = <0x380 0x80>;23112311- interrupts = <13>;23122312- interrupt-parent = <&PIC>;23132313- };23142314-23152315-23162316- r) Marvell Discovery PCI Error Handler nodes23172317-23182318- Represent the Discovery's PCI error handler device.23192319-23202320- Required properties:23212321- - compatible : "marvell,mv64360-pci-error"23222322- - reg : Offset and length of the register set for this device23232323- - interrupts : the interrupt number for this device23242324- - interrupt-parent : the phandle for the interrupt controller23252325- that services interrupts for this device.23262326-23272327- Example Discovery PCI Error Handler node:23282328- pci-error@1d40 {23292329- compatible = "marvell,mv64360-pci-error";23302330- reg = <0x1d40 0x40 0xc28 0x4>;23312331- interrupts = <12>;23322332- interrupt-parent = <&PIC>;23332333- };23342334-23352335-23362336- s) Marvell Discovery Memory Controller nodes23372337-23382338- Represent the Discovery's memory controller device.23392339-23402340- Required properties:23412341- - compatible : "marvell,mv64360-mem-ctrl"23422342- - reg : Offset and length of the register set for this device23432343- - interrupts : the interrupt number for this device23442344- - interrupt-parent : the phandle for the interrupt controller23452345- that services interrupts for this device.23462346-23472347- Example Discovery Memory Controller node:23482348- mem-ctrl@1400 {23492349- compatible = "marvell,mv64360-mem-ctrl";23502350- reg = <0x1400 0x60>;23512351- interrupts = <17>;23522352- interrupt-parent = <&PIC>;23532353- };23542354-23552355-23562356-VIII - Specifying interrupt information for devices12411241+VII - Specifying interrupt information for devices23571242===================================================2358124323591244The device tree represents the busses and devices of a hardware···13242439 2 = high to low edge sensitive type enabled13252440 3 = low to high edge sensitive type enabled1326244113271327-IX - Specifying GPIO information for devices13281328-============================================13291329-13301330-1) gpios property13311331------------------13321332-13331333-Nodes that makes use of GPIOs should define them using `gpios' property,13341334-format of which is: <&gpio-controller1-phandle gpio1-specifier13351335- &gpio-controller2-phandle gpio2-specifier13361336- 0 /* holes are permitted, means no GPIO 3 */13371337- &gpio-controller4-phandle gpio4-specifier13381338- ...>;13391339-13401340-Note that gpio-specifier length is controller dependent.13411341-13421342-gpio-specifier may encode: bank, pin position inside the bank,13431343-whether pin is open-drain and whether pin is logically inverted.13441344-13451345-Example of the node using GPIOs:13461346-13471347- node {13481348- gpios = <&qe_pio_e 18 0>;13491349- };13501350-13511351-In this example gpio-specifier is "18 0" and encodes GPIO pin number,13521352-and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller.13531353-13541354-2) gpio-controller nodes13551355-------------------------13561356-13571357-Every GPIO controller node must have #gpio-cells property defined,13581358-this information will be used to translate gpio-specifiers.13591359-13601360-Example of two SOC GPIO banks defined as gpio-controller nodes:13611361-13621362- qe_pio_a: gpio-controller@1400 {13631363- #gpio-cells = <2>;13641364- compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";13651365- reg = <0x1400 0x18>;13661366- gpio-controller;13671367- };13681368-13691369- qe_pio_e: gpio-controller@1460 {13701370- #gpio-cells = <2>;13711371- compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";13721372- reg = <0x1460 0x18>;13731373- gpio-controller;13741374- };13751375-13761376-X - Specifying Device Power Management Information (sleep property)24422442+VIII - Specifying Device Power Management Information (sleep property)13772443===================================================================1378244413792445Devices on SOCs often have mechanisms for placing devices into low-power
+148
Documentation/powerpc/dts-bindings/4xx/emac.txt
···11+ 4xx/Axon EMAC ethernet nodes22+33+ The EMAC ethernet controller in IBM and AMCC 4xx chips, and also44+ the Axon bridge. To operate this needs to interact with a ths55+ special McMAL DMA controller, and sometimes an RGMII or ZMII66+ interface. In addition to the nodes and properties described77+ below, the node for the OPB bus on which the EMAC sits must have a88+ correct clock-frequency property.99+1010+ i) The EMAC node itself1111+1212+ Required properties:1313+ - device_type : "network"1414+1515+ - compatible : compatible list, contains 2 entries, first is1616+ "ibm,emac-CHIP" where CHIP is the host ASIC (440gx,1717+ 405gp, Axon) and second is either "ibm,emac" or1818+ "ibm,emac4". For Axon, thus, we have: "ibm,emac-axon",1919+ "ibm,emac4"2020+ - interrupts : <interrupt mapping for EMAC IRQ and WOL IRQ>2121+ - interrupt-parent : optional, if needed for interrupt mapping2222+ - reg : <registers mapping>2323+ - local-mac-address : 6 bytes, MAC address2424+ - mal-device : phandle of the associated McMAL node2525+ - mal-tx-channel : 1 cell, index of the tx channel on McMAL associated2626+ with this EMAC2727+ - mal-rx-channel : 1 cell, index of the rx channel on McMAL associated2828+ with this EMAC2929+ - cell-index : 1 cell, hardware index of the EMAC cell on a given3030+ ASIC (typically 0x0 and 0x1 for EMAC0 and EMAC1 on3131+ each Axon chip)3232+ - max-frame-size : 1 cell, maximum frame size supported in bytes3333+ - rx-fifo-size : 1 cell, Rx fifo size in bytes for 10 and 100 Mb/sec3434+ operations.3535+ For Axon, 20483636+ - tx-fifo-size : 1 cell, Tx fifo size in bytes for 10 and 100 Mb/sec3737+ operations.3838+ For Axon, 2048.3939+ - fifo-entry-size : 1 cell, size of a fifo entry (used to calculate4040+ thresholds).4141+ For Axon, 0x000000104242+ - mal-burst-size : 1 cell, MAL burst size (used to calculate thresholds)4343+ in bytes.4444+ For Axon, 0x00000100 (I think ...)4545+ - phy-mode : string, mode of operations of the PHY interface.4646+ Supported values are: "mii", "rmii", "smii", "rgmii",4747+ "tbi", "gmii", rtbi", "sgmii".4848+ For Axon on CAB, it is "rgmii"4949+ - mdio-device : 1 cell, required iff using shared MDIO registers5050+ (440EP). phandle of the EMAC to use to drive the5151+ MDIO lines for the PHY used by this EMAC.5252+ - zmii-device : 1 cell, required iff connected to a ZMII. phandle of5353+ the ZMII device node5454+ - zmii-channel : 1 cell, required iff connected to a ZMII. Which ZMII5555+ channel or 0xffffffff if ZMII is only used for MDIO.5656+ - rgmii-device : 1 cell, required iff connected to an RGMII. phandle5757+ of the RGMII device node.5858+ For Axon: phandle of plb5/plb4/opb/rgmii5959+ - rgmii-channel : 1 cell, required iff connected to an RGMII. Which6060+ RGMII channel is used by this EMAC.6161+ Fox Axon: present, whatever value is appropriate for each6262+ EMAC, that is the content of the current (bogus) "phy-port"6363+ property.6464+6565+ Optional properties:6666+ - phy-address : 1 cell, optional, MDIO address of the PHY. If absent,6767+ a search is performed.6868+ - phy-map : 1 cell, optional, bitmap of addresses to probe the PHY6969+ for, used if phy-address is absent. bit 0x00000001 is7070+ MDIO address 0.7171+ For Axon it can be absent, though my current driver7272+ doesn't handle phy-address yet so for now, keep7373+ 0x00ffffff in it.7474+ - rx-fifo-size-gige : 1 cell, Rx fifo size in bytes for 1000 Mb/sec7575+ operations (if absent the value is the same as7676+ rx-fifo-size). For Axon, either absent or 2048.7777+ - tx-fifo-size-gige : 1 cell, Tx fifo size in bytes for 1000 Mb/sec7878+ operations (if absent the value is the same as7979+ tx-fifo-size). For Axon, either absent or 2048.8080+ - tah-device : 1 cell, optional. If connected to a TAH engine for8181+ offload, phandle of the TAH device node.8282+ - tah-channel : 1 cell, optional. If appropriate, channel used on the8383+ TAH engine.8484+8585+ Example:8686+8787+ EMAC0: ethernet@40000800 {8888+ device_type = "network";8989+ compatible = "ibm,emac-440gp", "ibm,emac";9090+ interrupt-parent = <&UIC1>;9191+ interrupts = <1c 4 1d 4>;9292+ reg = <40000800 70>;9393+ local-mac-address = [00 04 AC E3 1B 1E];9494+ mal-device = <&MAL0>;9595+ mal-tx-channel = <0 1>;9696+ mal-rx-channel = <0>;9797+ cell-index = <0>;9898+ max-frame-size = <5dc>;9999+ rx-fifo-size = <1000>;100100+ tx-fifo-size = <800>;101101+ phy-mode = "rmii";102102+ phy-map = <00000001>;103103+ zmii-device = <&ZMII0>;104104+ zmii-channel = <0>;105105+ };106106+107107+ ii) McMAL node108108+109109+ Required properties:110110+ - device_type : "dma-controller"111111+ - compatible : compatible list, containing 2 entries, first is112112+ "ibm,mcmal-CHIP" where CHIP is the host ASIC (like113113+ emac) and the second is either "ibm,mcmal" or114114+ "ibm,mcmal2".115115+ For Axon, "ibm,mcmal-axon","ibm,mcmal2"116116+ - interrupts : <interrupt mapping for the MAL interrupts sources:117117+ 5 sources: tx_eob, rx_eob, serr, txde, rxde>.118118+ For Axon: This is _different_ from the current119119+ firmware. We use the "delayed" interrupts for txeob120120+ and rxeob. Thus we end up with mapping those 5 MPIC121121+ interrupts, all level positive sensitive: 10, 11, 32,122122+ 33, 34 (in decimal)123123+ - dcr-reg : < DCR registers range >124124+ - dcr-parent : if needed for dcr-reg125125+ - num-tx-chans : 1 cell, number of Tx channels126126+ - num-rx-chans : 1 cell, number of Rx channels127127+128128+ iii) ZMII node129129+130130+ Required properties:131131+ - compatible : compatible list, containing 2 entries, first is132132+ "ibm,zmii-CHIP" where CHIP is the host ASIC (like133133+ EMAC) and the second is "ibm,zmii".134134+ For Axon, there is no ZMII node.135135+ - reg : <registers mapping>136136+137137+ iv) RGMII node138138+139139+ Required properties:140140+ - compatible : compatible list, containing 2 entries, first is141141+ "ibm,rgmii-CHIP" where CHIP is the host ASIC (like142142+ EMAC) and the second is "ibm,rgmii".143143+ For Axon, "ibm,rgmii-axon","ibm,rgmii"144144+ - reg : <registers mapping>145145+ - revision : as provided by the RGMII new version register if146146+ available.147147+ For Axon: 0x0000012a148148+
+50
Documentation/powerpc/dts-bindings/gpio/gpio.txt
···11+Specifying GPIO information for devices22+============================================33+44+1) gpios property55+-----------------66+77+Nodes that makes use of GPIOs should define them using `gpios' property,88+format of which is: <&gpio-controller1-phandle gpio1-specifier99+ &gpio-controller2-phandle gpio2-specifier1010+ 0 /* holes are permitted, means no GPIO 3 */1111+ &gpio-controller4-phandle gpio4-specifier1212+ ...>;1313+1414+Note that gpio-specifier length is controller dependent.1515+1616+gpio-specifier may encode: bank, pin position inside the bank,1717+whether pin is open-drain and whether pin is logically inverted.1818+1919+Example of the node using GPIOs:2020+2121+ node {2222+ gpios = <&qe_pio_e 18 0>;2323+ };2424+2525+In this example gpio-specifier is "18 0" and encodes GPIO pin number,2626+and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller.2727+2828+2) gpio-controller nodes2929+------------------------3030+3131+Every GPIO controller node must have #gpio-cells property defined,3232+this information will be used to translate gpio-specifiers.3333+3434+Example of two SOC GPIO banks defined as gpio-controller nodes:3535+3636+ qe_pio_a: gpio-controller@1400 {3737+ #gpio-cells = <2>;3838+ compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";3939+ reg = <0x1400 0x18>;4040+ gpio-controller;4141+ };4242+4343+ qe_pio_e: gpio-controller@1460 {4444+ #gpio-cells = <2>;4545+ compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";4646+ reg = <0x1460 0x18>;4747+ gpio-controller;4848+ };4949+5050+
+19
Documentation/powerpc/dts-bindings/gpio/mdio.txt
···11+MDIO on GPIOs22+33+Currently defined compatibles:44+- virtual,gpio-mdio55+66+MDC and MDIO lines connected to GPIO controllers are listed in the77+gpios property as described in section VIII.1 in the following order:88+99+MDC, MDIO.1010+1111+Example:1212+1313+mdio {1414+ compatible = "virtual,mdio-gpio";1515+ #address-cells = <1>;1616+ #size-cells = <0>;1717+ gpios = <&qe_pio_a 111818+ &qe_pio_c 6>;1919+};
+521
Documentation/powerpc/dts-bindings/marvell.txt
···11+Marvell Discovery mv64[345]6x System Controller chips22+===========================================================33+44+The Marvell mv64[345]60 series of system controller chips contain55+many of the peripherals needed to implement a complete computer66+system. In this section, we define device tree nodes to describe77+the system controller chip itself and each of the peripherals88+which it contains. Compatible string values for each node are99+prefixed with the string "marvell,", for Marvell Technology Group Ltd.1010+1111+1) The /system-controller node1212+1313+ This node is used to represent the system-controller and must be1414+ present when the system uses a system controller chip. The top-level1515+ system-controller node contains information that is global to all1616+ devices within the system controller chip. The node name begins1717+ with "system-controller" followed by the unit address, which is1818+ the base address of the memory-mapped register set for the system1919+ controller chip.2020+2121+ Required properties:2222+2323+ - ranges : Describes the translation of system controller addresses2424+ for memory mapped registers.2525+ - clock-frequency: Contains the main clock frequency for the system2626+ controller chip.2727+ - reg : This property defines the address and size of the2828+ memory-mapped registers contained within the system controller2929+ chip. The address specified in the "reg" property should match3030+ the unit address of the system-controller node.3131+ - #address-cells : Address representation for system controller3232+ devices. This field represents the number of cells needed to3333+ represent the address of the memory-mapped registers of devices3434+ within the system controller chip.3535+ - #size-cells : Size representation for for the memory-mapped3636+ registers within the system controller chip.3737+ - #interrupt-cells : Defines the width of cells used to represent3838+ interrupts.3939+4040+ Optional properties:4141+4242+ - model : The specific model of the system controller chip. Such4343+ as, "mv64360", "mv64460", or "mv64560".4444+ - compatible : A string identifying the compatibility identifiers4545+ of the system controller chip.4646+4747+ The system-controller node contains child nodes for each system4848+ controller device that the platform uses. Nodes should not be created4949+ for devices which exist on the system controller chip but are not used5050+5151+ Example Marvell Discovery mv64360 system-controller node:5252+5353+ system-controller@f1000000 { /* Marvell Discovery mv64360 */5454+ #address-cells = <1>;5555+ #size-cells = <1>;5656+ model = "mv64360"; /* Default */5757+ compatible = "marvell,mv64360";5858+ clock-frequency = <133333333>;5959+ reg = <0xf1000000 0x10000>;6060+ virtual-reg = <0xf1000000>;6161+ ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */6262+ 0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */6363+ 0xa0000000 0xa0000000 0x4000000 /* User FLASH */6464+ 0x00000000 0xf1000000 0x0010000 /* Bridge's regs */6565+ 0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */6666+6767+ [ child node definitions... ]6868+ }6969+7070+2) Child nodes of /system-controller7171+7272+ a) Marvell Discovery MDIO bus7373+7474+ The MDIO is a bus to which the PHY devices are connected. For each7575+ device that exists on this bus, a child node should be created. See7676+ the definition of the PHY node below for an example of how to define7777+ a PHY.7878+7979+ Required properties:8080+ - #address-cells : Should be <1>8181+ - #size-cells : Should be <0>8282+ - device_type : Should be "mdio"8383+ - compatible : Should be "marvell,mv64360-mdio"8484+8585+ Example:8686+8787+ mdio {8888+ #address-cells = <1>;8989+ #size-cells = <0>;9090+ device_type = "mdio";9191+ compatible = "marvell,mv64360-mdio";9292+9393+ ethernet-phy@0 {9494+ ......9595+ };9696+ };9797+9898+9999+ b) Marvell Discovery ethernet controller100100+101101+ The Discover ethernet controller is described with two levels102102+ of nodes. The first level describes an ethernet silicon block103103+ and the second level describes up to 3 ethernet nodes within104104+ that block. The reason for the multiple levels is that the105105+ registers for the node are interleaved within a single set106106+ of registers. The "ethernet-block" level describes the107107+ shared register set, and the "ethernet" nodes describe ethernet108108+ port-specific properties.109109+110110+ Ethernet block node111111+112112+ Required properties:113113+ - #address-cells : <1>114114+ - #size-cells : <0>115115+ - compatible : "marvell,mv64360-eth-block"116116+ - reg : Offset and length of the register set for this block117117+118118+ Example Discovery Ethernet block node:119119+ ethernet-block@2000 {120120+ #address-cells = <1>;121121+ #size-cells = <0>;122122+ compatible = "marvell,mv64360-eth-block";123123+ reg = <0x2000 0x2000>;124124+ ethernet@0 {125125+ .......126126+ };127127+ };128128+129129+ Ethernet port node130130+131131+ Required properties:132132+ - device_type : Should be "network".133133+ - compatible : Should be "marvell,mv64360-eth".134134+ - reg : Should be <0>, <1>, or <2>, according to which registers135135+ within the silicon block the device uses.136136+ - interrupts : <a> where a is the interrupt number for the port.137137+ - interrupt-parent : the phandle for the interrupt controller138138+ that services interrupts for this device.139139+ - phy : the phandle for the PHY connected to this ethernet140140+ controller.141141+ - local-mac-address : 6 bytes, MAC address142142+143143+ Example Discovery Ethernet port node:144144+ ethernet@0 {145145+ device_type = "network";146146+ compatible = "marvell,mv64360-eth";147147+ reg = <0>;148148+ interrupts = <32>;149149+ interrupt-parent = <&PIC>;150150+ phy = <&PHY0>;151151+ local-mac-address = [ 00 00 00 00 00 00 ];152152+ };153153+154154+155155+156156+ c) Marvell Discovery PHY nodes157157+158158+ Required properties:159159+ - device_type : Should be "ethernet-phy"160160+ - interrupts : <a> where a is the interrupt number for this phy.161161+ - interrupt-parent : the phandle for the interrupt controller that162162+ services interrupts for this device.163163+ - reg : The ID number for the phy, usually a small integer164164+165165+ Example Discovery PHY node:166166+ ethernet-phy@1 {167167+ device_type = "ethernet-phy";168168+ compatible = "broadcom,bcm5421";169169+ interrupts = <76>; /* GPP 12 */170170+ interrupt-parent = <&PIC>;171171+ reg = <1>;172172+ };173173+174174+175175+ d) Marvell Discovery SDMA nodes176176+177177+ Represent DMA hardware associated with the MPSC (multiprotocol178178+ serial controllers).179179+180180+ Required properties:181181+ - compatible : "marvell,mv64360-sdma"182182+ - reg : Offset and length of the register set for this device183183+ - interrupts : <a> where a is the interrupt number for the DMA184184+ device.185185+ - interrupt-parent : the phandle for the interrupt controller186186+ that services interrupts for this device.187187+188188+ Example Discovery SDMA node:189189+ sdma@4000 {190190+ compatible = "marvell,mv64360-sdma";191191+ reg = <0x4000 0xc18>;192192+ virtual-reg = <0xf1004000>;193193+ interrupts = <36>;194194+ interrupt-parent = <&PIC>;195195+ };196196+197197+198198+ e) Marvell Discovery BRG nodes199199+200200+ Represent baud rate generator hardware associated with the MPSC201201+ (multiprotocol serial controllers).202202+203203+ Required properties:204204+ - compatible : "marvell,mv64360-brg"205205+ - reg : Offset and length of the register set for this device206206+ - clock-src : A value from 0 to 15 which selects the clock207207+ source for the baud rate generator. This value corresponds208208+ to the CLKS value in the BRGx configuration register. See209209+ the mv64x60 User's Manual.210210+ - clock-frequence : The frequency (in Hz) of the baud rate211211+ generator's input clock.212212+ - current-speed : The current speed setting (presumably by213213+ firmware) of the baud rate generator.214214+215215+ Example Discovery BRG node:216216+ brg@b200 {217217+ compatible = "marvell,mv64360-brg";218218+ reg = <0xb200 0x8>;219219+ clock-src = <8>;220220+ clock-frequency = <133333333>;221221+ current-speed = <9600>;222222+ };223223+224224+225225+ f) Marvell Discovery CUNIT nodes226226+227227+ Represent the Serial Communications Unit device hardware.228228+229229+ Required properties:230230+ - reg : Offset and length of the register set for this device231231+232232+ Example Discovery CUNIT node:233233+ cunit@f200 {234234+ reg = <0xf200 0x200>;235235+ };236236+237237+238238+ g) Marvell Discovery MPSCROUTING nodes239239+240240+ Represent the Discovery's MPSC routing hardware241241+242242+ Required properties:243243+ - reg : Offset and length of the register set for this device244244+245245+ Example Discovery CUNIT node:246246+ mpscrouting@b500 {247247+ reg = <0xb400 0xc>;248248+ };249249+250250+251251+ h) Marvell Discovery MPSCINTR nodes252252+253253+ Represent the Discovery's MPSC DMA interrupt hardware registers254254+ (SDMA cause and mask registers).255255+256256+ Required properties:257257+ - reg : Offset and length of the register set for this device258258+259259+ Example Discovery MPSCINTR node:260260+ mpsintr@b800 {261261+ reg = <0xb800 0x100>;262262+ };263263+264264+265265+ i) Marvell Discovery MPSC nodes266266+267267+ Represent the Discovery's MPSC (Multiprotocol Serial Controller)268268+ serial port.269269+270270+ Required properties:271271+ - device_type : "serial"272272+ - compatible : "marvell,mv64360-mpsc"273273+ - reg : Offset and length of the register set for this device274274+ - sdma : the phandle for the SDMA node used by this port275275+ - brg : the phandle for the BRG node used by this port276276+ - cunit : the phandle for the CUNIT node used by this port277277+ - mpscrouting : the phandle for the MPSCROUTING node used by this port278278+ - mpscintr : the phandle for the MPSCINTR node used by this port279279+ - cell-index : the hardware index of this cell in the MPSC core280280+ - max_idle : value needed for MPSC CHR3 (Maximum Frame Length)281281+ register282282+ - interrupts : <a> where a is the interrupt number for the MPSC.283283+ - interrupt-parent : the phandle for the interrupt controller284284+ that services interrupts for this device.285285+286286+ Example Discovery MPSCINTR node:287287+ mpsc@8000 {288288+ device_type = "serial";289289+ compatible = "marvell,mv64360-mpsc";290290+ reg = <0x8000 0x38>;291291+ virtual-reg = <0xf1008000>;292292+ sdma = <&SDMA0>;293293+ brg = <&BRG0>;294294+ cunit = <&CUNIT>;295295+ mpscrouting = <&MPSCROUTING>;296296+ mpscintr = <&MPSCINTR>;297297+ cell-index = <0>;298298+ max_idle = <40>;299299+ interrupts = <40>;300300+ interrupt-parent = <&PIC>;301301+ };302302+303303+304304+ j) Marvell Discovery Watch Dog Timer nodes305305+306306+ Represent the Discovery's watchdog timer hardware307307+308308+ Required properties:309309+ - compatible : "marvell,mv64360-wdt"310310+ - reg : Offset and length of the register set for this device311311+312312+ Example Discovery Watch Dog Timer node:313313+ wdt@b410 {314314+ compatible = "marvell,mv64360-wdt";315315+ reg = <0xb410 0x8>;316316+ };317317+318318+319319+ k) Marvell Discovery I2C nodes320320+321321+ Represent the Discovery's I2C hardware322322+323323+ Required properties:324324+ - device_type : "i2c"325325+ - compatible : "marvell,mv64360-i2c"326326+ - reg : Offset and length of the register set for this device327327+ - interrupts : <a> where a is the interrupt number for the I2C.328328+ - interrupt-parent : the phandle for the interrupt controller329329+ that services interrupts for this device.330330+331331+ Example Discovery I2C node:332332+ compatible = "marvell,mv64360-i2c";333333+ reg = <0xc000 0x20>;334334+ virtual-reg = <0xf100c000>;335335+ interrupts = <37>;336336+ interrupt-parent = <&PIC>;337337+ };338338+339339+340340+ l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes341341+342342+ Represent the Discovery's PIC hardware343343+344344+ Required properties:345345+ - #interrupt-cells : <1>346346+ - #address-cells : <0>347347+ - compatible : "marvell,mv64360-pic"348348+ - reg : Offset and length of the register set for this device349349+ - interrupt-controller350350+351351+ Example Discovery PIC node:352352+ pic {353353+ #interrupt-cells = <1>;354354+ #address-cells = <0>;355355+ compatible = "marvell,mv64360-pic";356356+ reg = <0x0 0x88>;357357+ interrupt-controller;358358+ };359359+360360+361361+ m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes362362+363363+ Represent the Discovery's MPP hardware364364+365365+ Required properties:366366+ - compatible : "marvell,mv64360-mpp"367367+ - reg : Offset and length of the register set for this device368368+369369+ Example Discovery MPP node:370370+ mpp@f000 {371371+ compatible = "marvell,mv64360-mpp";372372+ reg = <0xf000 0x10>;373373+ };374374+375375+376376+ n) Marvell Discovery GPP (General Purpose Pins) nodes377377+378378+ Represent the Discovery's GPP hardware379379+380380+ Required properties:381381+ - compatible : "marvell,mv64360-gpp"382382+ - reg : Offset and length of the register set for this device383383+384384+ Example Discovery GPP node:385385+ gpp@f000 {386386+ compatible = "marvell,mv64360-gpp";387387+ reg = <0xf100 0x20>;388388+ };389389+390390+391391+ o) Marvell Discovery PCI host bridge node392392+393393+ Represents the Discovery's PCI host bridge device. The properties394394+ for this node conform to Rev 2.1 of the PCI Bus Binding to IEEE395395+ 1275-1994. A typical value for the compatible property is396396+ "marvell,mv64360-pci".397397+398398+ Example Discovery PCI host bridge node399399+ pci@80000000 {400400+ #address-cells = <3>;401401+ #size-cells = <2>;402402+ #interrupt-cells = <1>;403403+ device_type = "pci";404404+ compatible = "marvell,mv64360-pci";405405+ reg = <0xcf8 0x8>;406406+ ranges = <0x01000000 0x0 0x0407407+ 0x88000000 0x0 0x01000000408408+ 0x02000000 0x0 0x80000000409409+ 0x80000000 0x0 0x08000000>;410410+ bus-range = <0 255>;411411+ clock-frequency = <66000000>;412412+ interrupt-parent = <&PIC>;413413+ interrupt-map-mask = <0xf800 0x0 0x0 0x7>;414414+ interrupt-map = <415415+ /* IDSEL 0x0a */416416+ 0x5000 0 0 1 &PIC 80417417+ 0x5000 0 0 2 &PIC 81418418+ 0x5000 0 0 3 &PIC 91419419+ 0x5000 0 0 4 &PIC 93420420+421421+ /* IDSEL 0x0b */422422+ 0x5800 0 0 1 &PIC 91423423+ 0x5800 0 0 2 &PIC 93424424+ 0x5800 0 0 3 &PIC 80425425+ 0x5800 0 0 4 &PIC 81426426+427427+ /* IDSEL 0x0c */428428+ 0x6000 0 0 1 &PIC 91429429+ 0x6000 0 0 2 &PIC 93430430+ 0x6000 0 0 3 &PIC 80431431+ 0x6000 0 0 4 &PIC 81432432+433433+ /* IDSEL 0x0d */434434+ 0x6800 0 0 1 &PIC 93435435+ 0x6800 0 0 2 &PIC 80436436+ 0x6800 0 0 3 &PIC 81437437+ 0x6800 0 0 4 &PIC 91438438+ >;439439+ };440440+441441+442442+ p) Marvell Discovery CPU Error nodes443443+444444+ Represent the Discovery's CPU error handler device.445445+446446+ Required properties:447447+ - compatible : "marvell,mv64360-cpu-error"448448+ - reg : Offset and length of the register set for this device449449+ - interrupts : the interrupt number for this device450450+ - interrupt-parent : the phandle for the interrupt controller451451+ that services interrupts for this device.452452+453453+ Example Discovery CPU Error node:454454+ cpu-error@0070 {455455+ compatible = "marvell,mv64360-cpu-error";456456+ reg = <0x70 0x10 0x128 0x28>;457457+ interrupts = <3>;458458+ interrupt-parent = <&PIC>;459459+ };460460+461461+462462+ q) Marvell Discovery SRAM Controller nodes463463+464464+ Represent the Discovery's SRAM controller device.465465+466466+ Required properties:467467+ - compatible : "marvell,mv64360-sram-ctrl"468468+ - reg : Offset and length of the register set for this device469469+ - interrupts : the interrupt number for this device470470+ - interrupt-parent : the phandle for the interrupt controller471471+ that services interrupts for this device.472472+473473+ Example Discovery SRAM Controller node:474474+ sram-ctrl@0380 {475475+ compatible = "marvell,mv64360-sram-ctrl";476476+ reg = <0x380 0x80>;477477+ interrupts = <13>;478478+ interrupt-parent = <&PIC>;479479+ };480480+481481+482482+ r) Marvell Discovery PCI Error Handler nodes483483+484484+ Represent the Discovery's PCI error handler device.485485+486486+ Required properties:487487+ - compatible : "marvell,mv64360-pci-error"488488+ - reg : Offset and length of the register set for this device489489+ - interrupts : the interrupt number for this device490490+ - interrupt-parent : the phandle for the interrupt controller491491+ that services interrupts for this device.492492+493493+ Example Discovery PCI Error Handler node:494494+ pci-error@1d40 {495495+ compatible = "marvell,mv64360-pci-error";496496+ reg = <0x1d40 0x40 0xc28 0x4>;497497+ interrupts = <12>;498498+ interrupt-parent = <&PIC>;499499+ };500500+501501+502502+ s) Marvell Discovery Memory Controller nodes503503+504504+ Represent the Discovery's memory controller device.505505+506506+ Required properties:507507+ - compatible : "marvell,mv64360-mem-ctrl"508508+ - reg : Offset and length of the register set for this device509509+ - interrupts : the interrupt number for this device510510+ - interrupt-parent : the phandle for the interrupt controller511511+ that services interrupts for this device.512512+513513+ Example Discovery Memory Controller node:514514+ mem-ctrl@1400 {515515+ compatible = "marvell,mv64360-mem-ctrl";516516+ reg = <0x1400 0x60>;517517+ interrupts = <17>;518518+ interrupt-parent = <&PIC>;519519+ };520520+521521+
+25
Documentation/powerpc/dts-bindings/phy.txt
···11+PHY nodes22+33+Required properties:44+55+ - device_type : Should be "ethernet-phy"66+ - interrupts : <a b> where a is the interrupt number and b is a77+ field that represents an encoding of the sense and level88+ information for the interrupt. This should be encoded based on99+ the information in section 2) depending on the type of interrupt1010+ controller you have.1111+ - interrupt-parent : the phandle for the interrupt controller that1212+ services interrupts for this device.1313+ - reg : The ID number for the phy, usually a small integer1414+ - linux,phandle : phandle for this node; likely referenced by an1515+ ethernet controller node.1616+1717+Example:1818+1919+ethernet-phy@0 {2020+ linux,phandle = <2452000>2121+ interrupt-parent = <40000>;2222+ interrupts = <35 1>;2323+ reg = <0>;2424+ device_type = "ethernet-phy";2525+};
+57
Documentation/powerpc/dts-bindings/spi-bus.txt
···11+SPI (Serial Peripheral Interface) busses22+33+SPI busses can be described with a node for the SPI master device44+and a set of child nodes for each SPI slave on the bus. For this55+discussion, it is assumed that the system's SPI controller is in66+SPI master mode. This binding does not describe SPI controllers77+in slave mode.88+99+The SPI master node requires the following properties:1010+- #address-cells - number of cells required to define a chip select1111+ address on the SPI bus.1212+- #size-cells - should be zero.1313+- compatible - name of SPI bus controller following generic names1414+ recommended practice.1515+No other properties are required in the SPI bus node. It is assumed1616+that a driver for an SPI bus device will understand that it is an SPI bus.1717+However, the binding does not attempt to define the specific method for1818+assigning chip select numbers. Since SPI chip select configuration is1919+flexible and non-standardized, it is left out of this binding with the2020+assumption that board specific platform code will be used to manage2121+chip selects. Individual drivers can define additional properties to2222+support describing the chip select layout.2323+2424+SPI slave nodes must be children of the SPI master node and can2525+contain the following properties.2626+- reg - (required) chip select address of device.2727+- compatible - (required) name of SPI device following generic names2828+ recommended practice2929+- spi-max-frequency - (required) Maximum SPI clocking speed of device in Hz3030+- spi-cpol - (optional) Empty property indicating device requires3131+ inverse clock polarity (CPOL) mode3232+- spi-cpha - (optional) Empty property indicating device requires3333+ shifted clock phase (CPHA) mode3434+- spi-cs-high - (optional) Empty property indicating device requires3535+ chip select active high3636+3737+SPI example for an MPC5200 SPI bus:3838+ spi@f00 {3939+ #address-cells = <1>;4040+ #size-cells = <0>;4141+ compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";4242+ reg = <0xf00 0x20>;4343+ interrupts = <2 13 0 2 14 0>;4444+ interrupt-parent = <&mpc5200_pic>;4545+4646+ ethernet-switch@0 {4747+ compatible = "micrel,ks8995m";4848+ spi-max-frequency = <1000000>;4949+ reg = <0>;5050+ };5151+5252+ codec@1 {5353+ compatible = "ti,tlv320aic26";5454+ spi-max-frequency = <100000>;5555+ reg = <1>;5656+ };5757+ };
+25
Documentation/powerpc/dts-bindings/usb-ehci.txt
···11+USB EHCI controllers22+33+Required properties:44+ - compatible : should be "usb-ehci".55+ - reg : should contain at least address and length of the standard EHCI66+ register set for the device. Optional platform-dependent registers77+ (debug-port or other) can be also specified here, but only after88+ definition of standard EHCI registers.99+ - interrupts : one EHCI interrupt should be described here.1010+If device registers are implemented in big endian mode, the device1111+node should have "big-endian-regs" property.1212+If controller implementation operates with big endian descriptors,1313+"big-endian-desc" property should be specified.1414+If both big endian registers and descriptors are used by the controller1515+implementation, "big-endian" property can be specified instead of having1616+both "big-endian-regs" and "big-endian-desc".1717+1818+Example (Sequoia 440EPx):1919+ ehci@e0000300 {2020+ compatible = "ibm,usb-ehci-440epx", "usb-ehci";2121+ interrupt-parent = <&UIC0>;2222+ interrupts = <1a 4>;2323+ reg = <0 e0000300 90 0 e0000390 70>;2424+ big-endian;2525+ };
+295
Documentation/powerpc/dts-bindings/xilinx.txt
···11+ d) Xilinx IP cores22+33+ The Xilinx EDK toolchain ships with a set of IP cores (devices) for use44+ in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range55+ of standard device types (network, serial, etc.) and miscellaneous66+ devices (gpio, LCD, spi, etc). Also, since these devices are77+ implemented within the fpga fabric every instance of the device can be88+ synthesised with different options that change the behaviour.99+1010+ Each IP-core has a set of parameters which the FPGA designer can use to1111+ control how the core is synthesized. Historically, the EDK tool would1212+ extract the device parameters relevant to device drivers and copy them1313+ into an 'xparameters.h' in the form of #define symbols. This tells the1414+ device drivers how the IP cores are configured, but it requres the kernel1515+ to be recompiled every time the FPGA bitstream is resynthesized.1616+1717+ The new approach is to export the parameters into the device tree and1818+ generate a new device tree each time the FPGA bitstream changes. The1919+ parameters which used to be exported as #defines will now become2020+ properties of the device node. In general, device nodes for IP-cores2121+ will take the following form:2222+2323+ (name): (generic-name)@(base-address) {2424+ compatible = "xlnx,(ip-core-name)-(HW_VER)"2525+ [, (list of compatible devices), ...];2626+ reg = <(baseaddr) (size)>;2727+ interrupt-parent = <&interrupt-controller-phandle>;2828+ interrupts = < ... >;2929+ xlnx,(parameter1) = "(string-value)";3030+ xlnx,(parameter2) = <(int-value)>;3131+ };3232+3333+ (generic-name): an open firmware-style name that describes the3434+ generic class of device. Preferably, this is one word, such3535+ as 'serial' or 'ethernet'.3636+ (ip-core-name): the name of the ip block (given after the BEGIN3737+ directive in system.mhs). Should be in lowercase3838+ and all underscores '_' converted to dashes '-'.3939+ (name): is derived from the "PARAMETER INSTANCE" value.4040+ (parameter#): C_* parameters from system.mhs. The C_ prefix is4141+ dropped from the parameter name, the name is converted4242+ to lowercase and all underscore '_' characters are4343+ converted to dashes '-'.4444+ (baseaddr): the baseaddr parameter value (often named C_BASEADDR).4545+ (HW_VER): from the HW_VER parameter.4646+ (size): the address range size (often C_HIGHADDR - C_BASEADDR + 1).4747+4848+ Typically, the compatible list will include the exact IP core version4949+ followed by an older IP core version which implements the same5050+ interface or any other device with the same interface.5151+5252+ 'reg', 'interrupt-parent' and 'interrupts' are all optional properties.5353+5454+ For example, the following block from system.mhs:5555+5656+ BEGIN opb_uartlite5757+ PARAMETER INSTANCE = opb_uartlite_05858+ PARAMETER HW_VER = 1.00.b5959+ PARAMETER C_BAUDRATE = 1152006060+ PARAMETER C_DATA_BITS = 86161+ PARAMETER C_ODD_PARITY = 06262+ PARAMETER C_USE_PARITY = 06363+ PARAMETER C_CLK_FREQ = 500000006464+ PARAMETER C_BASEADDR = 0xEC1000006565+ PARAMETER C_HIGHADDR = 0xEC10FFFF6666+ BUS_INTERFACE SOPB = opb_76767+ PORT OPB_Clk = CLK_50MHz6868+ PORT Interrupt = opb_uartlite_0_Interrupt6969+ PORT RX = opb_uartlite_0_RX7070+ PORT TX = opb_uartlite_0_TX7171+ PORT OPB_Rst = sys_bus_reset_07272+ END7373+7474+ becomes the following device tree node:7575+7676+ opb_uartlite_0: serial@ec100000 {7777+ device_type = "serial";7878+ compatible = "xlnx,opb-uartlite-1.00.b";7979+ reg = <ec100000 10000>;8080+ interrupt-parent = <&opb_intc_0>;8181+ interrupts = <1 0>; // got this from the opb_intc parameters8282+ current-speed = <d#115200>; // standard serial device prop8383+ clock-frequency = <d#50000000>; // standard serial device prop8484+ xlnx,data-bits = <8>;8585+ xlnx,odd-parity = <0>;8686+ xlnx,use-parity = <0>;8787+ };8888+8989+ Some IP cores actually implement 2 or more logical devices. In9090+ this case, the device should still describe the whole IP core with9191+ a single node and add a child node for each logical device. The9292+ ranges property can be used to translate from parent IP-core to the9393+ registers of each device. In addition, the parent node should be9494+ compatible with the bus type 'xlnx,compound', and should contain9595+ #address-cells and #size-cells, as with any other bus. (Note: this9696+ makes the assumption that both logical devices have the same bus9797+ binding. If this is not true, then separate nodes should be used9898+ for each logical device). The 'cell-index' property can be used to9999+ enumerate logical devices within an IP core. For example, the100100+ following is the system.mhs entry for the dual ps2 controller found101101+ on the ml403 reference design.102102+103103+ BEGIN opb_ps2_dual_ref104104+ PARAMETER INSTANCE = opb_ps2_dual_ref_0105105+ PARAMETER HW_VER = 1.00.a106106+ PARAMETER C_BASEADDR = 0xA9000000107107+ PARAMETER C_HIGHADDR = 0xA9001FFF108108+ BUS_INTERFACE SOPB = opb_v20_0109109+ PORT Sys_Intr1 = ps2_1_intr110110+ PORT Sys_Intr2 = ps2_2_intr111111+ PORT Clkin1 = ps2_clk_rx_1112112+ PORT Clkin2 = ps2_clk_rx_2113113+ PORT Clkpd1 = ps2_clk_tx_1114114+ PORT Clkpd2 = ps2_clk_tx_2115115+ PORT Rx1 = ps2_d_rx_1116116+ PORT Rx2 = ps2_d_rx_2117117+ PORT Txpd1 = ps2_d_tx_1118118+ PORT Txpd2 = ps2_d_tx_2119119+ END120120+121121+ It would result in the following device tree nodes:122122+123123+ opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {124124+ #address-cells = <1>;125125+ #size-cells = <1>;126126+ compatible = "xlnx,compound";127127+ ranges = <0 a9000000 2000>;128128+ // If this device had extra parameters, then they would129129+ // go here.130130+ ps2@0 {131131+ compatible = "xlnx,opb-ps2-dual-ref-1.00.a";132132+ reg = <0 40>;133133+ interrupt-parent = <&opb_intc_0>;134134+ interrupts = <3 0>;135135+ cell-index = <0>;136136+ };137137+ ps2@1000 {138138+ compatible = "xlnx,opb-ps2-dual-ref-1.00.a";139139+ reg = <1000 40>;140140+ interrupt-parent = <&opb_intc_0>;141141+ interrupts = <3 0>;142142+ cell-index = <0>;143143+ };144144+ };145145+146146+ Also, the system.mhs file defines bus attachments from the processor147147+ to the devices. The device tree structure should reflect the bus148148+ attachments. Again an example; this system.mhs fragment:149149+150150+ BEGIN ppc405_virtex4151151+ PARAMETER INSTANCE = ppc405_0152152+ PARAMETER HW_VER = 1.01.a153153+ BUS_INTERFACE DPLB = plb_v34_0154154+ BUS_INTERFACE IPLB = plb_v34_0155155+ END156156+157157+ BEGIN opb_intc158158+ PARAMETER INSTANCE = opb_intc_0159159+ PARAMETER HW_VER = 1.00.c160160+ PARAMETER C_BASEADDR = 0xD1000FC0161161+ PARAMETER C_HIGHADDR = 0xD1000FDF162162+ BUS_INTERFACE SOPB = opb_v20_0163163+ END164164+165165+ BEGIN opb_uart16550166166+ PARAMETER INSTANCE = opb_uart16550_0167167+ PARAMETER HW_VER = 1.00.d168168+ PARAMETER C_BASEADDR = 0xa0000000169169+ PARAMETER C_HIGHADDR = 0xa0001FFF170170+ BUS_INTERFACE SOPB = opb_v20_0171171+ END172172+173173+ BEGIN plb_v34174174+ PARAMETER INSTANCE = plb_v34_0175175+ PARAMETER HW_VER = 1.02.a176176+ END177177+178178+ BEGIN plb_bram_if_cntlr179179+ PARAMETER INSTANCE = plb_bram_if_cntlr_0180180+ PARAMETER HW_VER = 1.00.b181181+ PARAMETER C_BASEADDR = 0xFFFF0000182182+ PARAMETER C_HIGHADDR = 0xFFFFFFFF183183+ BUS_INTERFACE SPLB = plb_v34_0184184+ END185185+186186+ BEGIN plb2opb_bridge187187+ PARAMETER INSTANCE = plb2opb_bridge_0188188+ PARAMETER HW_VER = 1.01.a189189+ PARAMETER C_RNG0_BASEADDR = 0x20000000190190+ PARAMETER C_RNG0_HIGHADDR = 0x3FFFFFFF191191+ PARAMETER C_RNG1_BASEADDR = 0x60000000192192+ PARAMETER C_RNG1_HIGHADDR = 0x7FFFFFFF193193+ PARAMETER C_RNG2_BASEADDR = 0x80000000194194+ PARAMETER C_RNG2_HIGHADDR = 0xBFFFFFFF195195+ PARAMETER C_RNG3_BASEADDR = 0xC0000000196196+ PARAMETER C_RNG3_HIGHADDR = 0xDFFFFFFF197197+ BUS_INTERFACE SPLB = plb_v34_0198198+ BUS_INTERFACE MOPB = opb_v20_0199199+ END200200+201201+ Gives this device tree (some properties removed for clarity):202202+203203+ plb@0 {204204+ #address-cells = <1>;205205+ #size-cells = <1>;206206+ compatible = "xlnx,plb-v34-1.02.a";207207+ device_type = "ibm,plb";208208+ ranges; // 1:1 translation209209+210210+ plb_bram_if_cntrl_0: bram@ffff0000 {211211+ reg = <ffff0000 10000>;212212+ }213213+214214+ opb@20000000 {215215+ #address-cells = <1>;216216+ #size-cells = <1>;217217+ ranges = <20000000 20000000 20000000218218+ 60000000 60000000 20000000219219+ 80000000 80000000 40000000220220+ c0000000 c0000000 20000000>;221221+222222+ opb_uart16550_0: serial@a0000000 {223223+ reg = <a00000000 2000>;224224+ };225225+226226+ opb_intc_0: interrupt-controller@d1000fc0 {227227+ reg = <d1000fc0 20>;228228+ };229229+ };230230+ };231231+232232+ That covers the general approach to binding xilinx IP cores into the233233+ device tree. The following are bindings for specific devices:234234+235235+ i) Xilinx ML300 Framebuffer236236+237237+ Simple framebuffer device from the ML300 reference design (also on the238238+ ML403 reference design as well as others).239239+240240+ Optional properties:241241+ - resolution = <xres yres> : pixel resolution of framebuffer. Some242242+ implementations use a different resolution.243243+ Default is <d#640 d#480>244244+ - virt-resolution = <xvirt yvirt> : Size of framebuffer in memory.245245+ Default is <d#1024 d#480>.246246+ - rotate-display (empty) : rotate display 180 degrees.247247+248248+ ii) Xilinx SystemACE249249+250250+ The Xilinx SystemACE device is used to program FPGAs from an FPGA251251+ bitstream stored on a CF card. It can also be used as a generic CF252252+ interface device.253253+254254+ Optional properties:255255+ - 8-bit (empty) : Set this property for SystemACE in 8 bit mode256256+257257+ iii) Xilinx EMAC and Xilinx TEMAC258258+259259+ Xilinx Ethernet devices. In addition to general xilinx properties260260+ listed above, nodes for these devices should include a phy-handle261261+ property, and may include other common network device properties262262+ like local-mac-address.263263+264264+ iv) Xilinx Uartlite265265+266266+ Xilinx uartlite devices are simple fixed speed serial ports.267267+268268+ Required properties:269269+ - current-speed : Baud rate of uartlite270270+271271+ v) Xilinx hwicap272272+273273+ Xilinx hwicap devices provide access to the configuration logic274274+ of the FPGA through the Internal Configuration Access Port275275+ (ICAP). The ICAP enables partial reconfiguration of the FPGA,276276+ readback of the configuration information, and some control over277277+ 'warm boots' of the FPGA fabric.278278+279279+ Required properties:280280+ - xlnx,family : The family of the FPGA, necessary since the281281+ capabilities of the underlying ICAP hardware282282+ differ between different families. May be283283+ 'virtex2p', 'virtex4', or 'virtex5'.284284+285285+ vi) Xilinx Uart 16550286286+287287+ Xilinx UART 16550 devices are very similar to the NS16550 but with288288+ different register spacing and an offset from the base address.289289+290290+ Required properties:291291+ - clock-frequency : Frequency of the clock input292292+ - reg-offset : A value of 3 is required293293+ - reg-shift : A value of 2 is required294294+295295+
···32323333#include <sysdev/fsl_soc.h>3434#include <sysdev/fsl_pci.h>3535-#include <linux/of_platform.h>36353736/* A few bit definitions needed for fixups on some boards */3837#define MPC85xx_L2CTL_L2E 0x80000000 /* L2 enable */
+6-3
arch/powerpc/sysdev/qe_lib/qe.c
···112112{113113 unsigned long flags;114114 u8 mcn_shift = 0, dev_shift = 0;115115+ u32 ret;115116116117 spin_lock_irqsave(&qe_lock, flags);117118 if (cmd == QE_RESET) {···140139 }141140142141 /* wait for the QE_CR_FLG to clear */143143- while(in_be32(&qe_immr->cp.cecr) & QE_CR_FLG)144144- cpu_relax();142142+ ret = spin_event_timeout((in_be32(&qe_immr->cp.cecr) & QE_CR_FLG) == 0,143143+ 100, 0);144144+ /* On timeout (e.g. failure), the expression will be false (ret == 0),145145+ otherwise it will be true (ret == 1). */145146 spin_unlock_irqrestore(&qe_lock, flags);146147147147- return 0;148148+ return ret == 1;148149}149150EXPORT_SYMBOL(qe_issue_cmd);150151