Jump to content

Rock Pi S, RK3308 CPU, is it supported by anything?


ballsystemlord

Recommended Posts

14 minutes ago, manuti said:

I pass the test fromhttps://github.com/armbian/testings/

Any additional information?

 

Thanks for confirming that it works. Focal images are also fixed and uploaded by now.


Well, its good that it works ... at all. I don't have this board so I can't test, but I am soon getting one. And it will be added to the autotest rig.

Link to comment
Share on other sites

32 minutes ago, Igor said:

Focal images

Downloaded and tested, but Focal 5.6 never boot. Etcher burned OK. Same microSD, same board, same power source, same Ethernet cable than Debian Buster. 

 

I'm going to download again to double check. 

Link to comment
Share on other sites

Just checked Armbian_21.02.0-trunk.4_Rockpi-s_buster_current_5.9.11_minimal image.
Wifi works, USB doesn't (lsusb gives no output).
Also, available frequencies are limited to 1008000, while with the legacy kernel  max freq is 1296000.

 

Here's the report:

+BOOT=yes
+VERSION=21.02.0-trunk.4
+KERNEL=5.9.11-rockchip64
+NETWORK=NT
+WIRELESS=yes
+HDMI=NA
+USB=no
+DVFS=NT
+ARMBIANMONITOR=http://ix.io/2G2R

Link to comment
Share on other sites

On 11/30/2020 at 5:16 PM, Kalobok said:

Just checked Armbian_21.02.0-trunk.4_Rockpi-s_buster_current_5.9.11_minimal image.
Wifi works, USB doesn't (lsusb gives no output).
Also, available frequencies are limited to 1008000, while with the legacy kernel  max freq is 1296000.

 

Here's the report:

+BOOT=yes
+VERSION=21.02.0-trunk.4
+KERNEL=5.9.11-rockchip64
+NETWORK=NT
+WIRELESS=yes
+HDMI=NA
+USB=no
+DVFS=NT
+ARMBIANMONITOR=http://ix.io/2G2R



Do you recall if USB was working on older images? Around the 5.5/6 kernel?

Link to comment
Share on other sites

Yep, I have a feeling I never added the USB nodes to the device tree.

Similar story with the CPU, 1008000 is the max frequency in the upstream dtsi, but the 4.4.x kernel from Rockchip added higher 1296000 and some tuning that needs to be patched in as well.

It should be all be trivial, but I don't have a device to test right now.. If your willing to test, can show you what to edit and once confirmed, we can add the patches to the build system..

 

Link to comment
Share on other sites

5 hours ago, ashthespy said:

Yep, I have a feeling I never added the USB nodes to the device tree.

Similar story with the CPU, 1008000 is the max frequency in the upstream dtsi, but the 4.4.x kernel from Rockchip added higher 1296000 and some tuning that needs to be patched in as well.

It should be all be trivial, but I don't have a device to test right now.. If your willing to test, can show you what to edit and once confirmed, we can add the patches to the build system..

 

Yes, I'd like to test, please provide me instructions.

Link to comment
Share on other sites

For usb, I try this:

 

Spoiler

git clone https://github.com/armbian/build.git armbian-build
git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git -b linux-5.9.y armbian-kernel
# optionnal: tar cf armbian-build.tar armbian-build/.git
# optionnal: tar cf armbian-kernel.tar armbian-kernel/.git
vi armbian-build/patch/kernel/rockchip64-current/rockpis-0023-dts-usb.patch

 


--- arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
+++ arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
@@ -331,3 +331,16 @@
    pinctrl-0 = <&uart4_xfer &uart4_rts &uart4_cts>;
    status = "okay";
 };
+
+&usb20_otg {
+    dr_mode = "otg";
+    status = "okay";
+};
+
+&usb_host0_ehci {
+    status = "okay";
+};
+
+&usb_host0_ohci{
+    status = "okay";
+};
--- arch/arm64/boot/dts/rockchip/rk3308.dtsi
+++ arch/arm64/boot/dts/rockchip/rk3308.dtsi
@@ -244,6 +244,43 @@
        status = "disabled";
    };

+    usb2phy_grf: syscon@ff008000 {
+        compatible = "rockchip,rk3308-usb2phy-grf", "syscon",
+                 "simple-mfd";
+        reg = <0x0 0xff008000 0x0 0x4000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        u2phy: usb2-phy@100 {
+            compatible = "rockchip,rk3308-usb2phy";
+            reg = <0x100 0x10>;
+            clocks = <&cru SCLK_USBPHY_REF>;
+            clock-names = "phyclk";
+            #clock-cells = <0>;
+            assigned-clocks = <&cru USB480M>;
+            assigned-clock-parents = <&u2phy>;
+            clock-output-names = "usb480m_phy";
+            status = "disabled";
+
+            u2phy_otg: otg-port {
+                #phy-cells = <0>;
+                interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+                interrupt-names = "otg-bvalid", "otg-id",
+                          "linestate";
+                status = "disabled";
+            };
+
+            u2phy_host: host-port {
+                #phy-cells = <0>;
+                interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+                interrupt-names = "linestate";
+                status = "disabled";
+            };
+        };
+    };
+
    wdt: watchdog@ff080000 {
        compatible = "snps,dw-wdt";
        reg = <0x0 0xff080000 0x0 0x100>;
@@ -763,6 +800,44 @@
        status = "disabled";
    };

+    usb20_otg: usb@ff400000 {
+        compatible = "rockchip,rk3066-usb", "snps,dwc2";
+        reg = <0x0 0xff400000 0x0 0x40000>;
+        interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cru HCLK_OTG>;
+        clock-names = "otg";
+        dr_mode = "otg";
+        g-np-tx-fifo-size = <16>;
+        g-rx-fifo-size = <280>;
+        g-tx-fifo-size = <256 128 128 64 32 16>;
+        g-use-dma;
+        phys = <&u2phy_otg>;
+        phy-names = "usb2-phy";
+        status = "disabled";
+    };
+
+    usb_host0_ehci: usb@ff440000 {
+        compatible = "generic-ehci";
+        reg = <0x0 0xff440000 0x0 0x10000>;
+        interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cru HCLK_HOST>, <&cru HCLK_HOST_ARB>, <&u2phy>;
+        clock-names = "usbhost", "arbiter", "utmi";
+        phys = <&u2phy_host>;
+        phy-names = "usb";
+        status = "disabled";
+    };
+
+    usb_host0_ohci: usb@ff450000 {
+        compatible = "generic-ohci";
+        reg = <0x0 0xff450000 0x0 0x10000>;
+        interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cru HCLK_HOST>, <&cru HCLK_HOST_ARB>, <&u2phy>;
+        clock-names = "usbhost", "arbiter", "utmi";
+        phys = <&u2phy_host>;
+        phy-names = "usb";
+        status = "disabled";
+    };
+
    sdmmc: mmc@ff480000 {
        compatible = "rockchip,rk3308-dw-mshc", "rockchip,rk3288-dw-mshc";
        reg = <0x0 0xff480000 0x0 0x4000>;

 


cd armbian-kernel
find ../armbian-build/patch/kernel/rockchip64-current -type f -name '*.patch' -print0 | sort -z | xargs -t -0 -n 1 patch -p1 -N -i
cp ../armbian-build/config/kernel/linux-rockpis-dev.config .config
export ARCH=arm64
export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
make oldconfig
make V=1 dtbs
export user=xxx
export host=xxx
scp arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dtb $user@$host:/home/$user/
ssh $user@$host
sudo cp -b rk3308-rock-pi-s.dtb /boot/dtb/rockchip/

 

 

But :

 

dmesg | grep usb
[    0.000000] Kernel command line: root=UUID=a1255f02-b778-4121-85dd-b01a09bf801b rootwait rootfstype=ext4 console=ttyS0,1500000  consoleblank=0 loglevel=1 ubootpart=408ad6cd-01 usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u swiotlb=1024  cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1
[    1.365523] usbcore: registered new interface driver usbfs
[    1.365593] usbcore: registered new interface driver hub
[    1.365865] usbcore: registered new device driver usb
[    2.900775] usbcore: registered new interface driver usb-storage
[    2.995068] usbcore: registered new interface driver usbhid
[    2.995074] usbhid: USB HID core driver

lsusb | wc -l
0

 

On radxa image I have :

 

Spoiler

dmesg | grep usb
[    0.156638] usbcore: registered new interface driver usbfs
[    0.156744] usbcore: registered new interface driver hub
[    0.156883] usbcore: registered new device driver usb
[    0.944414] ff400000.usb supply vusb_d not found, using dummy regulator
[    0.945113] ff400000.usb supply vusb_a not found, using dummy regulator
[    1.061993] dwc2 ff400000.usb: EPs: 10, dedicated fifos, 972 entries in SPRAM
[    1.063239] dwc2 ff400000.usb: DWC OTG Controller
[    1.063728] dwc2 ff400000.usb: new USB bus registered, assigned bus number 1
[    1.064422] dwc2 ff400000.usb: irq 21, io mem 0xff400000
[    1.065121] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.065765] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.066498] usb usb1: Product: DWC OTG Controller
[    1.066954] usb usb1: Manufacturer: Linux 4.4.143-52-rockchip-g7ed61b60d176 dwc2_hsotg
[    1.067711] usb usb1: SerialNumber: ff400000.usb
[    1.710048] phy phy-ff008000.syscon:usb2-phy@100.0: charger = USB_FLOATING_CHARGER
[    1.714605] ehci-platform ff440000.usb: EHCI Host Controller
[    1.715405] ehci-platform ff440000.usb: new USB bus registered, assigned bus number 2
[    1.716296] ehci-platform ff440000.usb: irq 22, io mem 0xff440000
[    1.725989] ehci-platform ff440000.usb: USB 2.0 started, EHCI 1.00
[    1.726771] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.727415] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.728111] usb usb2: Product: EHCI Host Controller
[    1.728578] usb usb2: Manufacturer: Linux 4.4.143-52-rockchip-g7ed61b60d176 ehci_hcd
[    1.729320] usb usb2: SerialNumber: ff440000.usb
[    1.733361] ohci-platform ff450000.usb: Generic Platform OHCI controller
[    1.734289] ohci-platform ff450000.usb: new USB bus registered, assigned bus number 3
[    1.735166] ohci-platform ff450000.usb: irq 23, io mem 0xff450000
[    1.794218] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[    1.794863] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.795560] usb usb3: Product: Generic Platform OHCI controller
[    1.796121] usb usb3: Manufacturer: Linux 4.4.143-52-rockchip-g7ed61b60d176 ohci_hcd
[    1.796864] usb usb3: SerialNumber: ff450000.usb
[    1.803207] usbcore: registered new interface driver uvcvideo
[    1.934162] usbcore: registered new interface driver usbhid
[    1.934705] usbhid: USB HID core driver
[    2.042066] usb 2-1: new high-speed USB device number 2 using ehci-platform
[    2.251932] usb 2-1: New USB device found, ...

 

 

 

Edited by TRS-80
put long output inside spoiler
Link to comment
Share on other sites

I forgot this:

Spoiler

&u2phy {
    status = "okay";

    u2phy_host: host-port {
        phy-supply = <&vcc5v0_otg>;
        status = "okay";
    };

    u2phy_otg: otg-port {
        vbus-supply = <&vcc5v0_otg>;
        status = "okay";
    };
};

And I fixed this : cp ../armbian-build/config/kernel/linux-rockchip64-current.config .config
But again no device found.

Spoiler

dmesg | grep 'usb\|ehci'
[    0.000000] Kernel command line: root=UUID=a1255f02-b778-4121-85dd-b01a09bf801b rootwait rootfstype=ext4 console=ttyS0,1500000  consoleblank=0 loglevel=1 ubootpart=408ad6cd-01 usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u swiotlb=1024  cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1
[    1.369267] usbcore: registered new interface driver usbfs
[    1.369337] usbcore: registered new interface driver hub
[    1.369483] usbcore: registered new device driver usb
[    2.900246] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.900303] ehci-pci: EHCI PCI platform driver
[    2.900365] ehci-platform: EHCI generic platform driver
[    2.901948] usbcore: registered new interface driver usb-storage
[    2.995777] usbcore: registered new interface driver usbhid
[    2.995784] usbhid: USB HID core driver
lsusb | wc -l
0

I can use armbian with kernel 4.4 for the moment, but I must compile the gpio-ir-recv module, it works
and I have a lot of lines "rc rc0: IR event FIFO is full!" in syslog. With armbian and kernel 5.9 this
module is present and works without these lines.
Perhaps a little effort to fix usb may be better.
 

Link to comment
Share on other sites

Spoiler

git clone https://github.com/armbian/build.git armbian-build
cd armbian-build
./compile.sh  BOARD=rockpi-s BRANCH=current KERNEL_ONLY=yes KERNEL_CONFIGURE=no
export user=xxx
export host=xxx
scp output/debs/linux-image-current-rockchip64_21.02.0-trunk_arm64.deb $user@$host:/home/$user/
scp output/debs/linux-dtb-current-rockchip64_21.02.0-trunk_arm64.deb $user@$host:/home/$user/
ssh $user@$host
sudo dpkg -i linux-image-current-rockchip64_21.02.0-trunk_arm64.deb
sudo dpkg -i linux-dtb-current-rockchip64_21.02.0-trunk_arm64.deb
sudo reboot

lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 152d:2329 JMicron Technology Corp. / JMicron USA Technology Corp. JM20329 SATA Bridge
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Super ! Thank you very much !

Link to comment
Share on other sites

@ashthespy, thanks for the hint.

 

USB hubs are now available:

Quote

anton@rockpi-s:~$ sudo lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

But USB devices are not recognized.  

 

Also, max frequency is limited to 1008000

Quote

anton@rockpi-s:~$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies
408000 600000 816000 1008000

 

Link to comment
Share on other sites

16 hours ago, Kalobok said:

Also, max frequency is limited to 1008000


I am not really an expert - but is this a big issue? If it is, we can port the dts patches over from Rockchips's 4.4 kernel..

  

16 hours ago, Kalobok said:

But USB devices are not recognized.  


Not sure what is going on then, sorry I am away for the board right now to be of any debugging use..
 

 

Link to comment
Share on other sites

On 12/18/2020 at 10:56 AM, ashthespy said:

I am not really an expert - but is this a big issue? If it is, we can port the dts patches over from Rockchips's 4.4 kernel..

Well, if it's possible, why not to include it? Especially that it's almost 30% increase in frequency. Since the board doesn't tend to overheat, there should be no thermal issues.

Also (and it's quite subjective, I admit), I have an impression that the board is somewhat slow when it has to generate web content for rpimonitor.

 

PS Tried usb with custom-built kernel - the same result (USB hubs are present but devices are not recognized).

Link to comment
Share on other sites

Your usb patch is working for me. My conbee 2 stick was recognised succesfully. Hope it will arrive soon in stable build to get rid of the old kernel.

 

A patch for "normal" cpu speed would be nice to but for my use case its more a nice to have.

Link to comment
Share on other sites

On 6/4/2020 at 7:31 AM, Igor said:


OK, One problem fixed, more to go ;) Thanks.

Wi-Fi issues again

My Rock Pi S show me two Wi-Fi devices but the board only have one, the built-in interface.

Also the wireless connection is unpredictable sometimes shows SSH port sometimes not, sometimes I can find using the Avahi daemon sometimes not...

 

I uploaded the testing from armbian-config tool http://ix.io/2O1s

I also added an image from "nmtui"

 

Any ideas?

 

Screenshot_20210201_231255.jpg

Link to comment
Share on other sites

Rockpi S is not supported and the last release is on 26-Aug-2021.
I have tested armbian 22.08 with bullseye and kernel 5.18 (edge), and it works. My usage: ethernet, usb, audio dac lineout, ir, i2c, spi, gpio.
With kernel 5.15 (current), module snd_soc_rk3308 is loaded, but there is no audio device.

How to build on debian with cross compilers installed :
 

df -h .  # 6,5G needed
git clone https://github.com/armbian/build.git armbian-build
cd armbian-build
sudo apt install debootstrap
sudo modprobe loop
systemd-run -p CPUQuota=$((`nproc`*50))% --scope bash -c './compile.sh BOARD=rockpi-s BRANCH=edge BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no CLEAN_LEVEL=, RELEASE=bullseye SKIP_EXTERNAL_TOOLCHAINS=yes'
cd output/images
ls -l Armbian_22.08.0-trunk_Rockpi-s_bullseye_edge_5.18.5_minimal.img
-rw-rw-r-- 1 root sudo 1061158912 19 juin  21:16 Armbian_22.08.0-trunk_Rockpi-s_bullseye_edge_5.18.5_minimal.img

 

Link to comment
Share on other sites

I realize that the Rockpi S is no longer officially supported.

Why was it dropped?

 

My application does not require audio.

What are the other problems with this board?

I like it because it draws only about 600mW, has built-in Ethernet and 2 USB ports.

 

The last release that supported it [Armbian 22.05] seems to work reasonably well for me.

WiFi, LAN and USB were OK.

SD card works but I could not access the SD flash (4-bit wide EMMC)

 

Running the build instructions posted by sbeaugrand on June 20 now...

 

Any insights appreciated!

 

Link to comment
Share on other sites

1 hour ago, brentr said:

I realize that the Rockpi S is no longer officially supported.

Why was it dropped?

Hi Brent,

We don't have a maintainer for this board and we have no budget for development.
If you want to get involved and maintain the Rockpi S, then Armbian is the ideal platform and it would be great if you could to join the team.

https://docs.armbian.com/User-Guide_Board-Support-Rules/

https://www.armbian.com/newsflash/armbian-needs-your-help/

The board is community supported, so you could build an image using the Armbian Build system: https://docs.armbian.com/Developer-Guide_Build-Preparation/

sbeaugrand's post above says that armbian 22.08 with bullseye and kernel 5.18 (edge) worked.  That's a current build.
 

Or you could try some images from the archives: https://www.armbian.com/rockpi-s/#kernels-archive-all

Link to comment
Share on other sites

SD NAND device working!

 

The RockPi S is optionally fitted with an "SD nand" chip.

Near as I can tell, the SD NAND is just an EMMC limited to a 4-bit data bus.

The file rk3308-rock-pi-s.dts has this EMMC defined with status: "disabled"

I merely changed it to "okay" and, voila, the SD NAND works!

 

The odd thing is that the unmodified u-boot has no trouble accessing the SD NAND,

even though the SDnand is also "disabled" in u-boot's dts files.

 

Question:

  I don't have a RockPi S without the SDnand chip.

  If someone does, could they verify that "enable"ing the non-existent part doesn't cause a kernel crash or hang?

  Also, what is your u-boot doing with the missing SDnand device?  Do you see two mmc devices or one?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines