新千葉 ガーベージ・コレクション

FPGA マガジンやインターフェースで書けなかったこと等をちょぼちょぼ書いてます。@ryos36

dts の interrupt その2

               spi@3,60 {
                        compatible = "abb,socrates-spi";
                        reg = <3 0x60 0x10>;
                        interrupts = <8 4 0>;   // number, type, routing
                        interrupt-parent = <&fpga_pic>;
                };

なんて記述を見つけた。この時の #interrupt-cells は

                fpga_pic: fpga-pic@3,10 {
                        compatible = "abb,socrates-fpga-pic";
                        reg = <3 0x10 0x10>;
                        interrupt-controller;
                        /* IRQs 2, 10, 11, active low, level-sensitive */
                        interrupts = <2 1 10 1 11 1>;
                        interrupt-parent = <&mpic>;
                        #interrupt-cells = <3>;
                };

fpga_pic がなんだかわからないが、自身の割り込みの cells は 2 。

               mpic: pic@40000 {
                        interrupt-controller;
                        #address-cells = <0>;
                        #interrupt-cells = <2>;
                        reg = <0x40000 0x40000>;
                        compatible = "chrp,open-pic";
                        device_type = "open-pic";
                };

PCI は 1。複雑な階層構造を持つことが可能らしい。数や意味はハード依存だな。

        pci0: pci@e0008000 {
                #interrupt-cells = <1>;
                #size-cells = <2>;
                #address-cells = <3>;
                compatible = "fsl,mpc8540-pci";
                device_type = "pci";
                reg = <0xe0008000 0x1000>;
                clock-frequency = <66666666>;