Open ForgetCSX opened 1 month ago
Sure, input taken. We actually worked on ESP-Hosted-Fg, to do add these as module params.
I'm not saying it might be perfect, but there are multiple angles we tried to cover in this change:
we tried to cover in this change
Did you make a change to add this feature?
I was trying to make the pins and spi bus configurable via Devicetree but never finished.
I started rebaseing all the commits onto master here https://github.com/Mr-Bossman/esp-hosted/releases/tag/example I have not tested this btw.
Also yes they are using the same SOC. https://github.com/espressif/esp-hosted/issues/253#issuecomment-2226521260
Yes I changed it here : https://github.com/espressif/esp-hosted/commit/8824a3f3c3dfb27003811f6d2c97020d6d6ef2e3
I had seen your code, and is indeed a good change. Thanks! This indeed is a nice change.
Unfortunately, we can't test it, unless extra efforts, so would you be able to complete this change some time? For now can you use FG as base (with recent change)? We are yet to add these params in NG..
I think, we can give alternate configuration methods. For example, module params not available, fetch these params from DT.
In any way, the error checking that these params are not initialised is intentionally is kept late checked, so that by any means, the parameters are available, should use them.. In worst case the error would flag, but parameters mandatorily need to be configured by user, somewhere..
Do you agree @Mr-Bossman ?
It is on master FG, already, which I forgot to mention.
https://github.com/espressif/esp-hosted/commit/8824a3f3c3dfb27003811f6d2c97020d6d6ef2e3#diff-7183abc3a1c81c0900093cac7fde0f05e4cf3e566d19ccd574a340bc43b06bc3R820 Here I update the module params if passed. If the params are still not updated, we can retrieve from device tree. Try not fail of some param is not updated from device tree. Anyway if the patram is not updated by any means, we will fail at last stage, just before using them.
clockspeed
is considered optional. If not initialised through any means, we keep it default to 10MHz. I am planning to auto change to its maximum value depending upon the bootup event from slave, where it exposes chip id of its own. But the risk here is that max clocks are 40MHz for some chipsets. But if users connections are lengthy, the 40Mhz would not be optimal. So yet thinking..
Recently saw a similar ESP wifi, in this repo, with a similar io initialization process https://github.com/Evlers/esp8089_wifi_drivers.git
I see that the current IO configuration and hardware interface ID information of NG are solidified inside the driver using macro definitions, is it possible to use the device tree to obtain this information in a unified way, so that you only need to modify the interface information on the host side, and you don't need to modify the source code on the slave side, so that it will be more convenient to port.