Upstream: ROCKNIX/distribution@4609c50
Two independent faults, one commit's worth of change.
1. The DTS never enables the nodes
Both sn3112 controllers ship disabled, so the stick LEDs cannot light no matter what the driver does:
kernel/dts/qcom/qcs8550-ayn-odin2.dts:194 pwm_rgb_left: sn3112@54 → status = "disabled" (:200)
kernel/dts/qcom/qcs8550-ayn-odin2.dts:241 pwm_rgb_right: sn3112@54 → status = "disabled" (:247)
2. set_bit() on a u8 array is a misaligned 64-bit atomic
kernel/patches/0034_sn3112-pwm-driver.patch:132:
set_bit(bit, (ulong *)&priv->pwm_en_reg[reg]);
pwm_en_reg is a u8 array. Casting an arbitrary byte offset to unsigned long * and handing it
to the bitops is not just a strict-aliasing problem — on arm64 the atomic bitops require natural
alignment, and the addressed word also runs past the intended byte into its neighbours. The fix is a
plain |= BIT(bit); nothing here is concurrent, so the atomic bought nothing to begin with.
Scope
Only the Odin 2 declares sn3112 nodes, so no other board changes. Cost is a two-line DTS edit plus a
re-roll of one hunk in patch 0034.
hw-gate: needs an Odin 2 to confirm the LEDs actually light and that probe does not crash. Both
halves want checking together — enabling the nodes is what first makes the buggy write execute.
Verified against main @ a53ba1b, 2026-08-29.
Upstream: ROCKNIX/distribution@4609c50
Two independent faults, one commit's worth of change.
1. The DTS never enables the nodes
Both sn3112 controllers ship disabled, so the stick LEDs cannot light no matter what the driver does:
kernel/dts/qcom/qcs8550-ayn-odin2.dts:194pwm_rgb_left: sn3112@54→status = "disabled"(:200)kernel/dts/qcom/qcs8550-ayn-odin2.dts:241pwm_rgb_right: sn3112@54→status = "disabled"(:247)2.
set_bit()on au8array is a misaligned 64-bit atomickernel/patches/0034_sn3112-pwm-driver.patch:132:pwm_en_regis au8array. Casting an arbitrary byte offset tounsigned long *and handing itto the bitops is not just a strict-aliasing problem — on arm64 the atomic bitops require natural
alignment, and the addressed word also runs past the intended byte into its neighbours. The fix is a
plain
|= BIT(bit); nothing here is concurrent, so the atomic bought nothing to begin with.Scope
Only the Odin 2 declares sn3112 nodes, so no other board changes. Cost is a two-line DTS edit plus a
re-roll of one hunk in patch 0034.
hw-gate: needs an Odin 2 to confirm the LEDs actually light and that probe does not crash. Bothhalves want checking together — enabling the nodes is what first makes the buggy write execute.
Verified against
main@ a53ba1b, 2026-08-29.