I’d like to use the IR remote functionality of the S905Y2. The S905Y2 quick reference says that there’s both IR_REMOTE_IN and IR_REMOTE_OUT signals that are mapped to gpio pins, and the datasheet (section 12.5) has a lot of information about receiving IR signals, though none about transmitting. But maybe the PWM functionality could be used for that?
I see the linux kernel has drivers for these things too. I can modprobe meson-ir and pwm-meson successfully, but no device files appear. Trying to modprobe meson-ir-tx gives an error, though (“No such device”).
Do I need a devicetree overlay to use these? Is it even possible on the Zero? Any tips would be appreciated.
(I know there are no IR sensors or leds on the board, I just want to hook them up to gpio pins)
I don’t think you need PWM per this post and that should give you some hint about how to implement the dt overlay. However, only IR out pin is exposed on the 40-pin header so that might not suit what you were trying to do in the first place.
I mostly figured out how to write a devicetree overlay, but I’m missing the base address. The datasheet pdf doesn’t even mention ir transmit, only receive (at 0xff808000). What address is the transmit functionality at?
That driver (meson-ir) is for receive. I want to transmit, so I want to use meson-ir-tx. There are no devices in any dts files in the kernel tree that are compatible with it, strangely enough. And I haven’t seen any evidence that the S905Y2 actually has a dedicated IR transmit device.
———
So now I’m trying to use PWM instead. I’m using this overlay to turn it on and add a pwm-based IR device:
[ 8.059321] rc rc0: PWM IR Transmitter as /devices/platform/irtx0/rc/rc0
[ 8.075367] rc rc0: lirc_dev: driver pwm-ir-tx registered at minor = 0, no receiver, raw IR transmitter
I can use ir-ctl to send scancodes.
It looks like the output should appear on pin 40, but when I hook it up to my IR led, it’s always on. And if I measure the pin with a multimeter it looks like it’s stuck on high. Am I doing this right? Is the output supposed to be inverted? Any other tips for using PWM output?
So sounds like it has one as well. You can probably take the below commit as a starting point of some hardware register of meson-ir-tx (this commit is Neil’s attempt to support the same device which he abandoned later)