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 GPIO2_B3";
		compatible = "rockchip,rk3308";
		category = "misc";
		exclusive = "GPIO2_B3";
		description = "Enable 1-Wire on GPIO2_B3.
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.

One wire works!! Thanks for it!

Other side, I compile the DHT dts and enabled it, but appears not to work. However, I’m not sure about point 3, can you give me more details about the necessary steps?

Finally, just one question, how to enable external antenna? No overlay listed.

please check the dht driver by the following cmd:

zcat /proc/config.gz | grep -i CONFIG_DHT11

I only enabled the overlay, I do not understood the dht11 driver part.

rock@seb-pr-e88f:~$ zcat /proc/config.gz | grep -i CONFIG_DHT11
# CONFIG_DHT11 is not set

This kernel does not include the dht11 driver, so you need use our bsp compile a kernel deb with dht11 driver, if it’s hard for you, I can compile it for you. And it’s ROCK PI S0, right ?

Oh! I see!.. Mmm I don´t know how to compile a kernel deb (I never did it) but with instructions I can do it. However, if it is easy for you, you help will be very welcome!
PS: external antenna overlay will also need a kernel deb compilation?

Edit: board is Rock Pi S v1.51. (Just realized that documentation is up to 1.3v)

here is the guide to compile kernel: https://docs.radxa.com/en/rockpi/rockpis/low-level-dev/kernel
you can add dht11 config to Kconfig under the profile directory.

Ok, first of all, sorry for still bothering you.

I followed the bsp guide on the RockPi, but due to space issues, I tried doing it on my PC.

The thing is, both “stable” (which is a symbolic link to “.stable-6.1”) and “.stable-6.6” profiles give me the same error when it gets to this point:

......
  CC [M]  drivers/net/bonding/bond_procfs.o
  LD [M]  drivers/net/bonding/bonding.o
  AR      drivers/built-in.a
make[2]: *** [Makefile:1913: .] Error 2
make[1]: *** [/mnt/c/Users/bruni/bsp/.src/linux/Makefile:359: __build_one_by_one] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/mnt/c/Users/bruni/bsp/.src/linux'
ec06e45cebfcef7b7c4180977c1efcf6ea799e58aac19849f31c679ad3eb09c9

Maybe am I doing something wrong?

what’s the cmd you compiled?

I tried these two profiles, without making any changes to the code as it appears to include already the dht11 driver.

stable profile:

./bsp linux stable --no-build
./bsp --no-prepare-source linux stable -r 999

.stable-6.6 profile (just in case):

./bsp linux .stable-6.6 --no-build
./bsp --no-prepare-source linux .stable-6.6 -r 999

Both ends, after a looooong time compiling things, with the following error:

......
  CC [M]  drivers/net/bonding/bond_procfs.o
  LD [M]  drivers/net/bonding/bonding.o
  AR      drivers/built-in.a
make[2]: *** [Makefile:1913: .] Error 2
make[1]: *** [/mnt/c/Users/bruni/bsp/.src/linux/Makefile:359: __build_one_by_one] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/mnt/c/Users/bruni/bsp/.src/linux'