[SC206][Yocto] Add python3-pip package to image results in lack of recoveryfs.img

Hi @keven.wu-Q

Can you share list of DTSI and DTS file which are used in sc206 module.

The following dtsi files are mainly involved:
src/vendor/qcom/proprietary/devicetree/qcom/scuba-pinctrl.dtsi
src/vendor/qcom/proprietary/devicetree/qcom/scuba-qrd.dtsi
src/vendor/qcom/proprietary/devicetree/qcom/scuba-qupv3.dtsi

Hi @keven.wu-Q

Thanks for your quick response.
can you please help to add support libgpiod

You don’t need to add the gpio library, I didn’t find this library. You just need to add GPIO and know how to use it, right?

Hi @keven.wu-Q

Thanks for your reply.

I am able to operate GPIO.

Currently, I am stuck at I2C operation. I want to enable SENSOR_I2C to interface another i2c device. Cloud please help me to how to add it.

When I go through the “Pepheral” document I found the below notes.

1. TrustZone opens only 1 I2C for customers to use by default, that is Q UPV3_0_SE2. If you need to
enable or disable other I2Cs , refer to the methods in Chapter 7.2 for I2C configuration. Please
contact Quectel Technical Supports to obtain tz image file before I2C configuration.
2. Each SE core can only support one of UART, SPI, or I2C simultaneously.

When I apply the command “ls /sys/class/i2c dev/” I got “i2c-0”. I go through document and I thing pins for I2C-0 are “TP_I2C_SCL” and “TP_I2C_SDA”. Please current my understanding.

Please help me to add support for “SENSOR_I2C”.

SENSOR_I2C is special. If you are not using it for sensor, please do not use it. You can use other i2c

Hi @keven.wu-Q

Thanks for your quick response.

I am using it for sensors only I wants to interface the air quality sensor.I have gone through “SC206E_Series_Linux_Sensor_Driver_Development_Guide” document and my sensor is not listed in the supported sensors.
Can you share process how can I add support of my sensor.

Are you an individual developer? If you are our customer, you can enable e-service and we will help you process it in this system. It takes a long time to transplant the sensor.

Hi @keven.wu-Q
Thank you for your quick response.

Currently, I would like to use “SENSOR_I2C” as a regular I2C bus for demo purposes. Later, we will switch to using this I2C as “SENSOR_I2C.”

Could you please guide me on how to configure “SENSOR_I2C” as a normal I2C bus?


I have checked the scuba-pinctrl.dtsi, scuba-qrd.dtsi and scuba-qupv3.dtsi files, and did not find GPIO109 being used. If you do not use the sensor function, you can directly use the GPIO109 and GPIO110 pins.

Hi @keven.wu-Q

Thank you for your prompt reply.

Yes, we do not wish to use the sensor function and would prefer to operate it as a standard I2C device.

To achieve this, I have to follow the instructions in “Chapter 7: I2C Function” of the “Quectel_SC206E_Series_Linux_Peripheral_Driver_Development_Guide_V1.1” document. Please confirm if my understanding is correct.

Apart from this, I want to use WIFI AP mode(hotspot). I have gone through the document “Quectel_SC206E_Series_Wi-Fi_Operation_User_Guide_V1.0.0_Preliminary_20220928” but I did not find any topic to set the AP mode of wifi in that document.

Please share the document for AP mode(hotspot) of WIFI if you have any?

To achieve this, I have to follow the instructions in “Chapter 7: I2C Function” of the “Quectel_SC206E_Series_Linux_Peripheral_Driver_Development_Guide_V1.1” document. Please confirm if my understanding is correct.
—>Yes,it is correct
Please share the document for AP mode(hotspot) of WIFI if you have any?

Step:

  1. Push the file udhcpd.conf to /etc/misc/wifi/
    C:\Windows\system32>adb push udhcpd.conf /etc/misc/wifi/
    udhcpd.zip (985 Bytes)

  2. Check whether the wpa process exists. If it exists, kill the process number
    / # ps -A | grep wpa
    11860 root 0:00 {grep} /bin/busybox /bin/grep wpa

  3. Set the IP, mask and gateway of the device AP
    / # ifconfig wlan0 192.168.0.1 netmask 255.255.254.0
    / # route add default gw 192.168.0.254
    / # route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    default 192.168.0.254 0.0.0.0 UG 0 0 0 wlan0
    192.168.0.0 * 255.255.254.0 U 0 0 0 wlan0
    192.168.225.0 * 255.255.255.0 U 0 0 0 bridge0

  4. Create AP hotspot hostapd /etc/misc/wifi/hostapd.conf -B
    / # hostapd /etc/misc/wifi/hostapd.conf -B
    Configuration file: /etc/misc/wifi/hostapd.conf
    wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
    wlan0: interface state COUNTRY_UPDATE->HT_SCAN

  5. Enable automatic IP allocation
    udhcpd /etc/misc/wifi/udhcpd.conf &
    Ifconfig shows that wlan0 has been reallocated

Hi @keven.wu-Q

Wifi AP mode is working as expected.

But I2C is not working. I made the below changes to work with “SENSOR_I2C” in the “scuba-pinctrl.dtsi” file.Other than this, I have not changed anything.

qupv3_se2_i2c_pins: qupv3_se2_i2c_pins {
			qupv3_se2_i2c_active: qupv3_se2_i2c_active {
				mux {
					pins = "gpio109", "gpio110";
					function = "qup2";
				};

				config {
					pins = "gpio109", "gpio110";
					drive-strength = <2>;
					bias-pull-up;
				};
			};

			qupv3_se2_i2c_sleep: qupv3_se2_i2c_sleep {
				mux {
					pins = "gpio109", "gpio110";
					function = "gpio";
				};

				config {
					pins = "gpio109", "gpio110";
					drive-strength = <2>;
					bias-disable;
				};
			};
		};

		/*qupv3_se2_spi_pins: qupv3_se2_spi_pins {
			qupv3_se2_spi_active: qupv3_se2_spi_active {
				mux {
					pins = "gpio6", "gpio7",
							"gpio71", "gpio80";
					function = "qup2";
				};

				config {
					pins = "gpio6", "gpio7",
							"gpio71", "gpio80";
					drive-strength = <6>;
					bias-disable;
				};
			};

			qupv3_se2_spi_sleep: qupv3_se2_spi_sleep {
				mux {
					pins = "gpio6", "gpio7",
							"gpio71", "gpio80";
					function = "gpio";
				};

				config {
					pins = "gpio6", "gpio7",
							"gpio71", "gpio80";
					drive-strength = <6>;
					bias-disable;
				};
			};
		};
		*/

On command $/sys/bus/i2c/devices/ i got below output
0-0014/ 0-0038/ 0-0045/ i2c-0/

To see activity on I2C bus i use below command.

root@qrbx210-rbx:~# i2ctransfer -y 0 w1@0x14 0x00 r2
[  271.528938] i2c_geni 4a88000.i2c: IO lines in bad state, Power the slave
i2ctransfer: I2C_RDWR: No such device or address

Hi @keven.wu-Q

Please help to work standard I2C on SENSOR_I2C pins.



The above files need to be configured, please refer to the peripheral document i2c section.

Hi @keven.wu-Q

I used “qupv3_se2_i2c”. and i change pins of it.Like below,

qupv3_se2_i2c_pins: qupv3_se2_i2c_pins {
			qupv3_se2_i2c_active: qupv3_se2_i2c_active {
				mux {
					pins = "gpio109", "gpio110";
					function = "qup2";
				};

				config {
					pins = "gpio109", "gpio110";
					drive-strength = <2>;
					bias-pull-up;
				};
			};

			qupv3_se2_i2c_sleep: qupv3_se2_i2c_sleep {
				mux {
					pins = "gpio109", "gpio110";
					function = "gpio";
				};

				config {
					pins = "gpio109", "gpio110";
					drive-strength = <2>;
					bias-disable;
				};
			};
		};

Is it correct?

It is not enough to just modify pinctrl. There is nothing wrong with your modification.
In the screenshot part, you also need to add the configuration of the i2c device.
Refer to the configuration section in the document.

0001-enable-i2c.patch (1.6 KB)
devcfg.zip (15.5 KB)
Setp:

  1. Merge the patch and use makeboot to compile the kernel separately
  2. Use fastboot to flash the boot image and tz image (devcfg.mbn) to the system

    image

Hi @keven.wu-Q

Thanks for your quick response.

I will add i2c device configuration and let you know.

Regarding sending tz image is it necessary to send it using “abd”? can I send it using debug UART? If no than please point out document to setup “ABD”.

The adb driver and fastboot driver are both in FTP, please download and install them yourself