Skip to content

Pin map

The kernel in the Bebop 2 4.7.1 image exports a sysfs directory, /sys/kernel/hsis/. Each file in it returns one number: the GPIO or PWM channel used for a function, or a hardware revision value. The init scripts read these files and export whatever number comes back, so the scripts name the functions and the kernel holds the numbers. This page lists both. What HSIS stands for is not stated anywhere in the image. The narrative is at the firmware story. Related: firmware images, evidence ledger.

Status Meaning
Verified Read from the kernel image or the root filesystem when this page was written.
Confirmed independently A second source agrees (here, one unit’s reported values, relayed by another session).
Agent-cited Read from the code by an automated analysis and not re-derived.
Open Not established.

The kernel built Wed Jun 6 12:02:19 UTC 2018 (see firmware images) holds one structure of integers, mk3_hsis, at address 0xc06b3aa0. A table of 22 entries, 20 bytes each, maps an attribute name to a field of that structure. Every entry has mode 0644 and shares one show function. Addresses below assume the kernel’s virtual base 0xC0008000 (file offset equals address minus the base). All numbers in the next table are the values stored in the image.

Two kinds of change happen at boot, and only the first was verified in the disassembly:

Item Status
The Milos entry routine at 0xc06741ac writes 83 into the reset_gnss cell (offset 0x54) and 0 into super_led_pwm (offset 0x24), then calls the common routine at 0xc0673ce4. Verified
The common routine and the Mykonos3 entry routine patch more cells for older hardware revisions (several set to -1; fan 6 for revisions 8 and 9). No further change on the Milos path was found. Agent-cited

Kind comes from how the init scripts use the number. Pad names are strings in the kernel that embed the GPIO number.

Attribute Kind Number Used by Pad name in the kernel Status
select_alim_us GPIO 200 rcS_IO: “US pulse level”, exported CAM_1_DATA00__GPIO_200__SPI_01b__CAM_0_VS or LCD_1_DATA17__GPIO_200__CAM_4_DATA01 Verified
reset_psoc GPIO 199 factory scripts toggle gpio199 around motor-board tests; the path user_gpio/RESET_PSOC appears as a string in dragon-prog (where no code reference to it was found), BLDC_Host_Bootloader, test-BLDC, check_motors and AR_Drone3_IMU_calibration CAM_1_CLK__GPIO_199__SPI_00b or LCD_1_DATA16__GPIO_199__CAM_4_DATA00 Verified
reset_wifi GPIO 9 no script found CAM_5_DATA02__GPIO_009__SD_2_DAT01 Verified
user_on_off GPIO 201 rcS: exported (the power button input) CAM_1_DATA01__GPIO_201__SPI_02b__CAM_0_HS or LCD_1_DATA18__GPIO_201__CAM_4_DATA02 Verified
fsync_gyro_p7 GPIO 90 rcS_video: frame sync, edge set to rising SPI_13__GPIO_090__AAI_28 Verified
gyro_int_p7 GPIO 91 rcS_IO: IMU data-ready interrupt, exported SPI_14__GPIO_091__AAI_29 Verified
magneto_int_p7 GPIO 124 no script found AAI_05__GPIO_124__PWM_05 Verified
fan GPIO 85 rcS_IO: set as output, driven to 0; the path user_gpio/FAN is also in dragon-prog SPI_08__GPIO_085__AAI_23 Verified
camera_v_pwdn GPIO 129 rcS_vision: power-down line, driven to 1 AAI_10__GPIO_129__PWM_10 Verified
camera_h_pwdn GPIO 132 rcS_video: power-down line, driven to 1 AAI_13__GPIO_132__PWM_13 Verified
host_mode_3v3 GPIO 202 no script found; the binary shpoison (a core boot service) reads user_gpio/HOST_MODE_3V3 (edge and value) LCD_1_DATA19__GPIO_202__CAM_4_DATA03 Verified
host_mode_on GPIO 203 no script found LCD_1_DATA20__GPIO_203__CAM_4_DATA04 Verified
usb0_oc GPIO 204 no script found; shpoison reads user_gpio/USB0_OC (value) LCD_1_DATA21__GPIO_204__CAM_4_DATA05 Verified
gps_power_en GPIO 81 no script found SPI_04__GPIO_081__AAI_19 Verified
thermal_pwm PWM 6 rcS_IO: IMU heater, 8 kHz, duty 0 at start AAI_06__GPIO_125__PWM_06 Verified
clkin_gyro PWM 8 rcS_IO: IMU input clock, period 31510 ns AAI_08__GPIO_127__PWM_08 Verified
camera_v_mclk PWM 9 rcS_vision: vertical camera clock, period 23 ns AAI_09__GPIO_128__PWM_09 Verified
camera_h_mclk PWM 11 rcS_video: front camera clock, period 77 ns AAI_11__GPIO_130__PWM_11 Verified
super_led_pwm PWM by name -1 in the image, 0 after the Milos entry routine no script found none looked up Verified
p7rev value -1 in the image, set at boot hsis file only none Verified
pcbrev value -1 in the image, set at boot copied to property ro.hsis.pcbrev (etc/boxinit.rc:24); also read in bin/ardrone3_fvt6.sh none Verified
hwrev value -1 in the image, set at boot copied to property ro.hsis.hwrev (etc/boxinit.rc:23) none Verified

Reading the pad strings: for the four PWM channels the string names the pad AAI_n with GPIO 119 plus n, so PWM channel n is a function option on that pad (Verified for channels 6, 8, 9 and 11). GPIOs 199, 200 and 201 have two different pad strings each in the kernel, one in a CAM_1 form and one in an LCD_1 form. Which pad table applies to this chip revision is Open.

Offset Value in the image Meaning Status
0x0c 73 role unknown Open
0x50 82 GPS_FLASH in the user GPIO export table (the entry points at this cell) Verified
0x54 -1 in the image, 83 after the Milos entry routine RESET_GNSS in the user GPIO export table (the entry points at this cell) Verified

The kernel also creates links under /sys/devices/platform/user_gpio/<NAME>. Fourteen names are registered, in two ways. Seven (FSYNC_GYRO_P7, RESET_WIFI, RESET_GNSS, GPS_FLASH, GPS_POWER_EN, USER_ON_OFF, SELECT_ALIM_US) are listed in an export table of entries made of a field pointer, a flags word and a name pointer, stored in two copies, one per board; their numbers below are read from that table (Verified). The other seven are registered by calls to a helper at 0xc06739c4 that receives the GPIO number in a register, a flags value and the name; the call sites were found by their name addresses (Verified), but which hsis field each caller passes was read by an automated analysis (Agent-cited). A search of every file in the image finds the path user_gpio/<NAME> for nine of the fourteen (third column).

Name Number Path found in Status
FSYNC_GYRO_P7 90 etc/init.d/rcS_video Verified
RESET_WIFI 9 no file Verified
RESET_GNSS -1 in the image, 83 on the Milos path no file Verified
GPS_FLASH 82 no file Verified
GPS_POWER_EN 81 no file Verified
USER_ON_OFF 201 etc/init.d/rcS Verified
SELECT_ALIM_US 200 no file (the hsis attribute is read in rcS_IO) Verified
FAN 85 etc/init.d/rcS_IO, dragon-prog Name Verified, number Agent-cited
RESET_PSOC 199 string in dragon-prog (no code reference found), BLDC_Host_Bootloader, test-BLDC, check_motors, AR_Drone3_IMU_calibration Name Verified, number Agent-cited
MAGNETO_INT_P7 124 no file Agent-cited
HOST_MODE_3V3 202 shpoison Name Verified, number Agent-cited
USB0_OC 204 shpoison Name Verified, number Agent-cited
CAMERA_V_PWDN 129 etc/init.d/rcS_vision Name Verified, number Agent-cited
CAMERA_H_PWDN 132 etc/init.d/rcS_video Name Verified, number Agent-cited

The export helper refuses numbers above 0x112 (Agent-cited). The two copies of the export table differ in one place, the GPS_FLASH flags word: 0 in the first copy and 2 in the second (Verified). Which copy belongs to which board, Mykonos3 first and Milos second, was read by an automated analysis (Agent-cited).

Item Status
The kernel holds two machine descriptors, number 9974 for Milos and 9996 for Mykonos3, each appearing once as a word in the image. Verified
pcbrev is read from three GPIOs, 138, 139 and 140, as bits 0 to 2. Agent-cited
On the Milos path hwrev equals pcbrev plus 11. One unit reports pcbrev 3 and hwrev 14, which fits this rule (the Mykonos3 path would give 6). Confirmed independently
p7rev is a chip revision read plus one, and the code rejects any chip that does not read 2. Agent-cited
The kernel logs the warning system_rev != mk3_hsis.hwrev. Verified
Question Status
Which pad table applies to this chip revision. Open
What machine type the bootloader passes at boot. Open
The role of the cell at offset 0x0c (73), of host_mode_on, and of the fan value 6 on some Mykonos3 revisions. Open
Where servo1_pwm to servo4_pwm come from: the flight program reads these paths, and this kernel exports no such attribute. Open
What the letters HSIS stand for. Open

Comments

Spotted a mistake, or tried this on your own Bebop? Leave a note. Comments are kept on this site's own server.