On Sun, Dec 19, 2021 at 12:20:18PM -0300, João Victor wrote:
> >Synopsis: <Wifi doesn't work on Samsung NP530XBB-AD2BR notebook>
> >Category: <kernel>
> >Environment:
> System : OpenBSD 7.0
> Details : OpenBSD 7.0 (GENERIC.MP) #232: Thu Sep 30 14:25:29
> MDT 2021
> [email protected]:
> /usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> Architecture: OpenBSD.amd64
> Machine : amd64
> >Description:
> <After installing iwm firmware, dmesg shows:
> "Intel Gemini Lake CNVi" rev 0x03 at pci0 dev 12 function 0 not
> configured>
This device is not yet supported.
Here is patch. It is a complete shot in the dark, but worth trying.
The device name string can be fixed up later. What is important for
now is that the driver attaches and produces a working interface.
diff 6bbb73995c8e71f4ccedb27558b1e4887fc58c34 /usr/src
blob - ae02ad71669e77dae57e2df7d89346f5296b0f26
file + sys/dev/pci/if_iwm.c
--- sys/dev/pci/if_iwm.c
+++ sys/dev/pci/if_iwm.c
@@ -847,7 +847,7 @@ iwm_read_firmware(struct iwm_softc *sc)
err = EINVAL;
goto parse_out;
}
- sc->sc_fw_phy_config = le32toh(*(uint32_t *)tlv_data);
+ sc->sc_fw_phy_config |= le32toh(*(uint32_t *)tlv_data);
break;
case IWM_UCODE_TLV_API_CHANGES_SET: {
@@ -11177,6 +11177,7 @@ static const struct pci_matchid iwm_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_9260_1 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_9560_1 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_9560_2 },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_GLK_WL },
};
int
@@ -11405,6 +11406,7 @@ iwm_attach(struct device *parent, struct device *self,
break;
case PCI_PRODUCT_INTEL_WL_9560_1:
case PCI_PRODUCT_INTEL_WL_9560_2:
+ case PCI_PRODUCT_INTEL_GLK_WL:
sc->sc_fwname = "iwm-9000-46";
sc->host_interrupt_operation_mode = 0;
sc->sc_device_family = IWM_DEVICE_FAMILY_9000;
@@ -11412,7 +11414,11 @@ iwm_attach(struct device *parent, struct device *self,
sc->sc_nvm_max_section_size = 32768;
sc->sc_mqrx_supported = 1;
sc->sc_integrated = 1;
- sc->sc_xtal_latency = 650;
+ if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_GLK_WL) {
+ sc->sc_xtal_latency = 670;
+ sc->sc_fw_phy_config = IWM_FW_PHY_CFG_SHARED_CLK;
+ } else
+ sc->sc_xtal_latency = 650;
break;
default:
printf("%s: unknown adapter type\n", DEVNAME(sc));
blob - 59ae267a763600b0893079abfbf5d13d6c5678d0
file + sys/dev/pci/if_iwmreg.h
--- sys/dev/pci/if_iwmreg.h
+++ sys/dev/pci/if_iwmreg.h
@@ -982,6 +982,7 @@ struct iwm_tlv_calib_ctrl {
#define IWM_FW_PHY_CFG_TX_CHAIN (0xf <<
IWM_FW_PHY_CFG_TX_CHAIN_POS)
#define IWM_FW_PHY_CFG_RX_CHAIN_POS 20
#define IWM_FW_PHY_CFG_RX_CHAIN (0xf <<
IWM_FW_PHY_CFG_RX_CHAIN_POS)
+#define IWM_FW_PHY_CFG_SHARED_CLK (1U << 31)
#define IWM_UCODE_MAX_CS 1