Checking my math (fig) on modifying a buck driver

Sure. It’s pretty easy to get confused when:

  • The exact same physical part can be used in multiple roles. Current sensing vs Current limiting being the case in point.
  • The same package can be used to hold entirely different types of electrical component. Plus, often the markings are sanded off!

The good news is that what you actually want to do is pretty straightforward.

  • There appears to be plenty of space for a child PCB with the ATtiny13A installed on it as well as a voltage divider made of either SMD or big through-hole resistors.
  • IIRC the buck controller ImA4Wheelr [/scold] pointed out is almost certainly a QX9920, who’s pinout we already know. In fact, the whole driver is very similar to the HX-1175b, so it might behoove you to look over ImA4Wheelr’s thread about that driver. I posted the QX9920 pinout in post #104 there, but it’s around elsewhere as well. Note that ImA4Wheelr does successfully piggyback an ATtiny13A in that thread.
  • The bottom left pin is the pin which gets PWM from the MCU. It’s called EN (Chip Enable) on the QX9920.
  • Note that HKJ has reviewed your driver as “TR-0124 14-66W 5-Mode LED Flashlight Driver for Luminus SST-90”