radxa-pkg / radxa-overlays

Additional device tree overlays to support different hardwares on Radxa products
GNU General Public License v2.0
43 stars 31 forks source link

Please add support for the following devices and sensors that have kernel support #364

Open Jibun-no-Kage opened 2 months ago

Jibun-no-Kage commented 2 months ago

Please add support for the following devices and sensors that have kernel support:

AHTx0 BH1750 BME280, BME680, BMP280, BMP380, HDC100X, JC42 complaint sensors, for example MCP980x, MPU6050, MPU9250 LM75 TMP102 DHT11/DHT21/DHT22 htu2x i.e. htu21 sht3x i.e. sht31 sht4x i.e. sht41 si7020

enc28j60 pcf8574,pcf8575

Reference... See i2c-sensor.dtbo content... https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README

RadxaYuntian commented 2 months ago

enc28j60 is already supported. For others PRs are welcome.

Jibun-no-Kage commented 2 months ago

Cool. I should looked at the existing support! For RTCs, I know at least one is noted in the documentation. https://wiki.radxa.com/Zero/dev/RTC_module_ds3231. I need to check and see which ones I have. I believe I have DS3121s, and also DS1307. Does anything need to be changed/added to support DS1307?

Jibun-no-Kage commented 2 months ago

Are you planning to create a master 'dtbo' file for sensors, similar to the Pi device implementation? Or individual dtbo files for each sensor? I find the i2c-sensor implementation easy to use, since you just pass in the i2c bus, sensor identifier, and i2c address to the dtbo. But if you choose to establish separate dtbo files, that works too. You will always need to allow for the bus, and i2c address even if separate files.

RadxaYuntian commented 2 months ago

Raspberry Pi's overlay parameters is exclusive to themselves. Normal U-Boot does not support this, so everything has to be its own overlay. We do split overlays into reusable modules if possible, but that's at source level: https://github.com/radxa-pkg/radxa-overlays/blob/main/arch/arm64/boot/dts/rockchip/overlays/rk3399-spi1-waveshare35.dts#L1-L2

Jibun-no-Kage commented 2 months ago

Ah... OK, was just an idea, that seemed reasonable to suggest. It is what it is.