Missing Overlays!

Morning everyone!
I’m triying to migrate from a raspberry pi model 4 with dietpi to a RockPiS. My main problems are the device tree overlays…
With DietPi I can’t enable UART1/UART2, OneWire and DHT overlays.
With Radxa OS, before & after apt update & upgrade, I can enable UART1/2, but onewire and dht overlays do not exist!.
I created dts files and compiled them using rsetup, no success.
Also wit Radxa OS, I got many debug messages from UART0, ff320000.i2s-rk3308-hifi, I suspect sound module, but I do not have any other overlay enabled.
Please, can you guide me?
Also, would be nice having more support from Radxa, as I like their product and seems to be very good quality!

I’m thinking in test some older SO images, with older kernel, as it seems to be problematic in newer versions. What do you think?

I can’t find onewire and dht overlays in our overlays repo, can you give me a link of the missing overlays?

And the output message “ff320000.i2s-rk3308-hifi” has no effect on the audio, it’s a driver bug of upstream linux.

1 Like

Hi Nasca!

In the wiki, the OneWire DTS is listed.

https://wiki.radxa.com/Device-tree-overlays#:~:text=console-on-uart2-,rk3308-w1-gpio,-rockpis-v11-spi2

DHT Overlay never existed for any Radxa product, as long I know.

So sorry to tell you that the wiki content is too old, but you can refer to our overlay repo to write the one-wire overlay, for example,

you just need change the One-wire GPIO and metadate in the dts, and then enable it by rsetup if you use our Radxa OS.

and if you use other os, you need compile dts to dtbo.

Thanks, Nasca! Acordding the code, it uses includes that aren’t available in the repo.

I did found an old dts and adapt it but do not works. Overlay is loaded but nothing shows in /sys/bys/w1/devices.

// Definitions for w1-gpio module (without external pullup)
/dts-v1/;
/plugin/;

/ {
compatible = “rockchip,rk3308”;
overlay-name = “w1-gpio-overlay”;

    fragment@0 {
            target-path = "/";
            __overlay__ {

                    w1: onewire@0 {
                            compatible = "w1-gpio";
                            pinctrl-names = "default";
                            gpios = <&gpio0 17 0 0xae>; // GPIO0_C1
                            status = "okay";
                    };
            };
    };

};

I also write a DHT dts, and do not works also.

/dts-v1/;
/plugin/;

/ {
compatible = “rockchip,rk3308”;

fragment@0 {
    target-path = "/";
    __overlay__ {
        dht11: dht11@0 {
            compatible = "dht11";
            pinctrl-names = "default";
            gpios = <&gpio0 16 0>; /* GPIO2_B3 */
            status = "okay";
        };
    };
};

};

Also the external antenna is missing too.

BTW I’m using the latest Radxa OS.

On the other hand, what packages or libraries are recommended for programming a Python script to communicate directly with DHT or 1-wire?
So I’ll try that option.


/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>

/ {
	metadata {
		title = "Enable 1-Wire on GPIO4_D6";
		compatible = "rockchip,rk3308";
		category = "misc";
		exclusive = "GPIO0_C1";
		description = "Enable 1-Wire on GPIO0_C1.
On ROCK PI S this is pin 15.";
	};
};

&{/} {
	w1: onewire {
		compatible = "w1-gpio";
		pinctrl-names = "default";
		gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
		status = "okay";
	};
};


/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>

/ {
	metadata {
		title = "Enable 1-Wire on GPIO4_D6";
		compatible = "rockchip,rk3308";
		category = "misc";
		exclusive = "GPIO0_C1";
		description = "Enable 1-Wire on GPIO0_C1.
On ROCK PI S this is pin 44.";
	};
};

&{/} {
	dht11: dht11@0 {
		compatible = "dht11";
		pinctrl-names = "default";
		gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_HIGH>;
		status = "okay";
	};
};

  1. you need use system utils rsetup to enable them
  2. you can find one-wire device under the directory /sys/bus/w1/devices/ (eg, 28-xxxx) after you enable it and reboot your system
  3. for dth11, you need use our bsp compile a kernel deb with dht11 driver
  4. maybe you can use python lib periphery.