Welcome to the Linux Foundation Forum!

Device tree alternative in x86

Options

Hello,
As far as I know, we don't have device trees in x86 systems and my question is "what is the alternative to that?"
Let me give you an example:
To bind an I2C client driver (e.g. rtc1307) to I2C controller driver, we can go to "/sys/class/i2c-adapter/i2c-x" where i2c-x is the I2C bus controller to which our i2c client (e.g. rtc1307) is connected. Now to make i2c client driver use i2c-x controller driver as the bus driver, we can use "/sys/class/i2c-adapter/i2c-x$ sudo sh -c "echo ds1307 0x68 > new_device" . From now on i2c client driver can communicate with the i2c client module (e.g. rtc1307) via i2c-x controller driver
Now I have the same question about mcp251x... How can I bind it to my spi controller driver in x86 system where we don't have device trees so that it can use of it to communicate with mcp251x module?

Thanks in advance

Comments

  • opendrain
    Options

    Devicetrees are used on SoC's, so cpu with internal hardware modules as i2c, spi, and, in particular, for embedded, so to enable only general onboard devices (platform devices). On x86 /_64 such protocols are handled from other chips connected to cpu. Also, on a pc everything is detected dynamically on pci/usb/ etc and this is the reason why you don't need to define fdt nodes for devices.

Categories

Upcoming Training