It looks like it uses the EQOS driver (kernel feature “CONFIG_EQOS=y” can be found in “/proc/config.gz”). So far as bind/unbind goes, I’m not sure what you are looking for. If you simply mean to load or unload the driver dynamically, then the integrated driver (“=y”) would need to be replaced with a module format driver (“=m”).
Something you might find of interest even though it isn’t exactly what you are asking about are the following:
If you run “ifconfig eth0”, then you will see it uses hardware IRQ 41 (or at least on my TX2 it does). You can cross-reference this with the file “/proc/interrupts”, find hardware IRQ 41, and see something similar to this: 41: 103 0 0 0 0 0 GICv2 226 Level ether_qos.common_irq
…which indicates driver ether_qos.
If you look at "find -L /proc/device-tree/ -iname '*ether_qos*' you will find an entry such as “ether_qos@2490000”. You could find more than one entry, but I see just the one at address 0x2490000. This must be the physical address of the ether_qos driver.
If you look at the device tree (since the ethernet chip is not plug-n-play) you will find this node: ether_qos@2490000->compatible
…which lists drivers which can work with this hardware, and you will note that one of them is the “eqos” driver. If you were to remove “eqos” from “compatible”, then this driver would no longer load for this hardware. Normally this is not useful, but since the driver is integrated into the kernel (“=y”) and is not in the form of a module (“=m”), then not using the device tree to mark that driver compatible would cause the driver to not load (I don’t know if the “nvidia” part would matter or not in this case, never tried).
If you rebuild the kernel with a new CONFIG_LOCALVERSION (e.g., something like “-test”), and with the ether_qos set as a module (“=m”, assuming this is available…not all drivers can have a module format, and not all drivers can have an integrated format, but likely this can be either), and install the new “Image-test”, you could in theory unload or load the driver at will (though something might cause it to be busy and not unload). You would of course have to install both the Image-test and the modules in “/lib/modules/$(uname -r)/kernel” location (where “uname -r” would change to suffix “-test”).
When you speak of bind and unbind, is this what you are looking for? I suppose there is another way to tell an integrated driver to disassociate from the hardware, but the above methods are what I know of.
I’m not sure what you want to do will work if you are not also changing the ethernet chipset. However, it might be possible, and it is basically just a case of trying it and finding out.
Keep in mind as I describe this that when you configure a kernel feature it should be through a config tool which understands dependencies. Some people use “make menuconfig”, but I like “make nconfig” (which has a symbol search function). For either of these your compile platform will need the “libncurses5-dev” package (“sudo apt-get install libncurses5-dev”). You will start with an existing configuration, which means either “make tegra_defconfig”, or else copying “/proc/config.gz” in the right place, using gunzip on it, and renaming it to “.config”. If your Jetson is stock, then this is the same result. If your current kernel is modified, then you should only use the “config.gz” method. *For either method you still need to set CONFIG_LOCALVERSION to something new and other than “-tegra” if you change the “=y” to “=m”, and then fully install both the Image (“make Image”) and modules. An example alternate CONFIG_LOCALVERSION might be “=-test”. Do not delete your old “/boot/Image” file, simply create a new entry which points at an alternate file name, e.g., “Image-test”. Tip: There are several ways to set CONFIG_LOCALVERSION.
If you know which drivers are involved, then once you have a matching configuration you should start the config editor (I’ll assume “make nconfig” since it allows you to search for things like “localversion” and “blk_dev_integrity”). If the editor allows you to switch it from “=y” to “=m”, then in theory it will work. If you have two possible drivers, then the “compatible” entry in the device tree could list both drivers as compatible, and then you could load or unload after boot based on which driver you pick. Don’t know if it will actually work, but as long as your original Image file is in place and you use serial console to pick an alternate entry to Image-test, it is safe to try.
I cannot tell what you want to do by your comment here. It seems the goal you want to achieve has nothing to with bind/unbind a driver… why not you elaborate your goal first?
You mentioned “igb” and also “rt-ethernet” driver. These two sound not related to each other either.
No… this is not the problem of “another driver”… The hardware is fixed. The only one that can control the ethernet PHY on TX2 is the eqos driver.
Each driver needs to correspond to a particular chipset. A driver for a different chipset won’t work on the original hardware. It sounds like you need to add a second ethernet card/chipset.