Contenu connexe
Similaire à Device tree support on arm linux (20)
Device tree support on arm linux
- 1. Device Tree Support on ARM Linux 趙至敏 (Chih-Min Chao) [email_address] http://gplus.to/cmchao COSCUP 2011 in Taiwan
- 7. Device Tree Work Flow Description Script Compiler Binary Data Bootloader Platform Kernel Hardware configuration Carry Pass Look up probe DTS DTC DTB
- 8. DTS (Device Tree Script) / { model = "ARM Versatile AB"; compatible = "arm,versatile-ab"; #address-cells = <1>; #size-cells = <1>; interrupt-parent = <&vic>; memory { reg = <0x0 0x08000000>; }; net@10010000 { compatible = "smsc,lan91c111"; reg = <0x10010000 0x10000>; interrupts = <25>; }; };
- 9. DTS (Device Tree Script) / { model = "ARM Versatile AB"; compatible = "arm,versatile-ab"; #address-cells = <1>; #size-cells = <1>; interrupt-parent = <&vic>; memory { reg = <0x0 0x08000000>; }; net@10010000 { compatible = "smsc,lan91c111"; reg = <0x10010000 0x10000>; interrupts = <25>; }; }; Initial Structure (root node’s property) Node 1 Node 2 Root Node
- 10. DTS (Device Tree Script) / { model = "ARM Versatile AB"; compatible = " arm , versatile-ab "; #address-cells = <1>; #size-cells = <1>; interrupt-parent = <&vic>; memory { reg = <0x0 0x08000000>; }; net@10010000 { compatible = " smsc , lan91c111 "; reg = <0x10010000 0x10000>; interrupts = <25>; }; }; Device loop-up “ <manufacturer>,<model>”
- 11. DTS (Device Tree Script) / { model = "ARM Versatile AB"; compatible = "arm,versatile-ab"; #address-cells = <1>; #size-cells = <1>; interrupt-parent = <&vic>; memory { reg = < 0x0 0x08000000 >; }; net@ 10010000 { compatible = "smsc,lan91c111"; reg = < 0x10010000 0x10000 >; interrupts = <25>; }; }; Unit : 32bit <addr_u0 addr_u1 ..size_u0..>
- 12. DTS (Device Tree Script) /{ i2c0: i2c@10002000 { #address-cells = <1>; #size-cells = <0>; compatible = "arm,versatile-i2c"; reg = <0x10002000 0x1000>; rtc@68 { compatible = "dallas,ds1338"; reg = <0x68>; }; }; }; child node
- 14. DTS - Driver Probing #ifdef CONFIG_OF static const struct of_device_id smc91x_match[] = { { .compatible = "smsc,lan91c94", }, { .compatible = "smsc,lan91c111" , }, {},}; MODULE_DEVICE_TABLE(of, smc91x_match); #else #define smc91x_match NULL #endif static struct platform_driver smc_driver = { .driver = { .name = CARDNAME, .owner = THIS_MODULE, .pm = &smc_drv_pm_ops, .of_match_table = smc91x_match, }, }; net@10010000 { compatible = " smsc,lan91c111 "; reg = <0x10010000 0x10000>; interrupts = <25>; };