最終更新:2014-06-06 (金) 10:40:00 (2222d)  

DTS
Top / DTS

Device Tree Source

  • usb@12000000 {
    	compatible = "samsung,exynos5250-dwusb3";
    	clocks = <&clock 286>;
    	clock-names = "usbdrd30";
    	#address-cells = <1>;
    	#size-cells = <1>;
    	ranges;
    
    	dwc3 {
    		compatible = "synopsys,dwc3";
    		reg = <0x12000000 0x10000>;
    		interrupts = <0 72 0>;
    		usb-phy = <&usb2_phy &usb3_phy>;
    	};
    };

場所

  • arch/arm/boot/dts
  • arch/c6x/boot/dts?
  • arch/microblaze/boot/dts?
  • arch/xtensa/boot/dts?
  • arch/x86/boot/dts?
  • arch/arc/boot/dts?
  • arch/arm64/boot/dts?
  • arch/openrisc/boot/dts?
  • arch/powerpc/boot/dts?
  • arch/mips/boot/dts?
  • arch/metag/boot/dts?

フォーマット

ドライバ側での使い方

Getting a reference to the clock

  • described by the clocks property
  • s->clk = clk_get?(&pdev->dev, NULL);

Getting the I/O registers resource (reg)

Getting the interrupt (interruputs)

  • described by the interrupts property
  • s->irq = platform_get_irq(pdev, 0);
    • IORESOURCE_IRQ?

Get a DMA channel

  • described by the dmas property
  • s->rx_dma_chan = dma_request_slave_channel?(s->dev, "rx");
  • s->tx_dma_chan = dma_request_slave_channel?(s->dev, "tx");

Check some custom property

  • struct device_node? *np = pdev->dev.of_node;
  • if (of_get_property(np, "fsl,uart-has-rtscts", NULL))

参考