ESP-hosted

  • Hello, your device configuration requirements are directly added in the corresponding DTS file (sdk/config/dts_config).

    Code: Select all

    &spi0 {
    	status = "okay";
    };
    
    In the corresponding rv1103-luckfox-pico-ipc.dtsi, all the relevant pins of the spi have been added to the pinctrl

    Code: Select all

    	pinctrl-0 = <&spi0m0_clk &spi0m0_miso &spi0m0_mosi &spi0m0_cs0>;
    
    If you need to add a new device to share the SPI, you can use the spi0m0_cs1 and change the PINCTRL-0 to

    Code: Select all

    	pinctrl-0 = <&spi0m0_clk &spi0m0_miso &spi0m0_mosi &spi0m0_cs0 &spi0m0_cs1>;
    
    The other pins are GPIO functions by default if not set, and do not need to be configured
  • Okay, thanks. I will try that configuration now.
  • I can now confirm that ESP-hosted has been successfully ported to Luckfox-pico. It works very well !
    Last edited by freetoair on 2024-10-01 23:43, edited 4 times in total.
  • freetoair wrote: 2024-09-30 13:30 I can now confirm that ESP-hosted has been successfully ported to Luckfox-pico. It works very well !
    hey, do you mind to post manual here?
  • Im my case I am using pins 48, 49, 50, 51 for SPI communication, however, getting errors:
    [ 81.511209] cfg80211: Loading compiled-in X.509 certificates for regulatory database
    [ 81.528056] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    [ 81.528328] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
    [ 81.528345] cfg80211: failed to load regulatory.db
    [ 81.764967] esp32_spi: spi_dev_init: Using SPI MODE 2
    [ 81.765066] rockchip-spi ff500000.spi: chipselect 0 already in use
    [ 81.765100] esp32_spi: spi_dev_init: Failed to add new SPI device
    [ 82.204824] esp32_spi: spi_init: Failed Init SPI device
    [ 82.444940] esp32_spi: spi_dev_init: Using SPI MODE 2
    [ 82.445041] rockchip-spi ff500000.spi: chipselect 0 already in use
    [ 82.445075] esp32_spi: spi_dev_init: Failed to add new SPI device
    [ 82.884907] esp32_spi: spi_init: Failed Init SPI device
    [ 142.272021] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /spi@ff500000/status
    [ 142.272041] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /spi@ff500000/pinctrl-0
    [ 142.272054] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /spi@ff500000/spidev@0/status
    [ 142.272064] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /spi@ff500000/spidev@0/spi-max-frequency
    [ 148.630410] OF: overlay: find target, node: /fragment@1, path '/spi@ff500000/fbtft@0' not found
    [ 148.630431] OF: overlay: init_overlay_changeset() failed, ret = -22

    My DT records

    Code: Select all

    &spi0 { 
        status = "okay"; 
        pinctrl-0 = <&spi0m0_clk &spi0m0_miso &spi0m0_mosi &spi0m0_cs0>;
        spidev@0 { 
            compatible = "spidev"; 
            reg = <0>; 
            spi-max-frequency = <50000000>; 
        }; 
        fbtft@0 { 
            status = "disabled"; 
        }; 
    };
    Last edited by 5t0x2fh1z on 2025-12-22 14:10, edited 1 time in total.