]> git.ipfire.org Git - thirdparty/openwrt.git/commit
net: pcs: airoha: fix swapped JCPLL SDM DI_LS/DI_EN REG_FIELD entries main master 23876/head
authorWayen Yan <win847@gmail.com>
Fri, 19 Jun 2026 08:03:52 +0000 (16:03 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Fri, 19 Jun 2026 08:11:06 +0000 (10:11 +0200)
commit0d7add7433c5327cc4fe9d04d46189e8d2b55e7e
tree812e7c896a47221bf641118b9d2fa7c5956a0441
parent3ed5f087337c6e3d23da446647193c07277a39b4
net: pcs: airoha: fix swapped JCPLL SDM DI_LS/DI_EN REG_FIELD entries

The JCPLL SDM DI_LS and DI_EN REG_FIELD entries have their bit
positions swapped compared to the #define macros:

  #define JCPLL_SDM_DI_LS   GENMASK(25,24)  → bits 24-25
  #define JCPLL_SDM_DI_EN   BIT(16)          → bit 16

But the REG_FIELD mapping is:
  DI_LS → REG_FIELD(..., 16, 16)  ← wrong, should be (24, 25)
  DI_EN → REG_FIELD(..., 24, 25)  ← wrong, should be (16, 16)

Fix by swapping the enum and REG_FIELD order so DI_EN comes before
DI_LS, keeping the bit values in ascending order and matching the
register layout. This way:

  [DI_EN] = REG_FIELD(..., 16, 16)  ← BIT(16) ✓
  [DI_LS] = REG_FIELD(..., 24, 25)  ← GENMASK(25,24) ✓

The TXPLL section in the same file already follows this bit-order
convention (DI_EN at bit 0, DI_LS at bits 8-9).

Signed-off-by: Wayen Yan <win847@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23876
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/airoha/patches-6.18/310-09-net-pcs-airoha-add-PCS-driver-for-Airoha-AN7581-SoC.patch