I have some future projects on my radar that will implement solar power with battery management systems. Before building my own, I ordered two different low cost solar charging lights to tear down to see how solar battery charging is handled at the lowest cost in mass manufacturing. The tear-down results were surprising! These devices sold at the same unit price but varied significantly in quality and implementation.
Unfortunately searching "AY10W01" did not yield a datasheet match. But by looking at the PCB around the chip can help. By mapping the chip's inputs and outputs, I determined the chip was a programmable IC, and must have firmware onboard.
This AY10W01 IC has two sense pins to support the motion sensor and two IO pins to detect and input and provide an output for the momentary power button of the device. The fact that the IC must keep track of the operation state from a momentary switch is what indicated the presence of memory, and thus programmability of the chip. This is a more complex implementation than the other system that has no firmware or IC to control the device behavior.
AY10W01 Pinout:
1-VCC, 2-Sense, 3-Sense, 4-Sense, 5-GND, 6-GPIO, 7-GPIO, 8-GND
Based on the pin-out, this is probably an AT-TINY SOIC-8 clone.