Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions arch/arm64/boot/dts/exynos/google/gs201-panther.dts
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,45 @@
regulator-boot-on;
};

/*
* WL_REG_ON of the BCM4389. Google raises it and waits 200 ms before
* training the link (WIFI_TURNON_DELAY in bcmdhd). Modelled as the
* root port's supply so the PCI pwrctrl core switches it around link
* training. With pcie_1 disabled nothing enables it, so the chip
* stays off.
*/
wlan_pwr: regulator-wlan {
compatible = "regulator-fixed";
regulator-name = "wlan-reg-on";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gph2 4 GPIO_ACTIVE_HIGH>;
enable-active-high;
startup-delay-us = <200000>;
pinctrl-0 = <&wlan_reg_on>;
pinctrl-names = "default";
};

reserved-memory {
#address-cells = <2>;
#size-cells = <1>;
ranges;

/*
* All of the Wi-Fi chip's DMA buffers come from this pool. It
* keeps driver bugs and stray pointers away from the rest of
* RAM; it does not stop the chip's own firmware from reaching
* other memory (the HSI2 SysMMU and S2MPU see the PCIe and UFS
* masters on the same VID, so neither can confine it alone).
*/
wifi_dma_pool: wifi-dma-pool {
compatible = "restricted-dma-pool";
size = <0x1000000>;
alignment = <0x0 0x200000>;
/* the chip's writes above 4 GiB are not seen */
alloc-ranges = <0x0 0x80000000 0x80000000>;
};

/*
* Stock's region and layout (ramoops_mem@fd3ff000 in its live
* tree), so a log from this kernel can be read after a warm
Expand Down Expand Up @@ -339,6 +373,13 @@
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

wlan_host_wake: wlan-host-wake-pins {
samsung,pins = "gpa6-1";
samsung,pin-function = <GS101_PIN_FUNC_EINT>;
samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};
};

&pinctrl_gpio_alive {
Expand Down Expand Up @@ -467,3 +508,68 @@
};
};
};

/*
* Wi-Fi: BCM4389 on PCIe GEN4A_1, one lane at Gen2 as on stock. The chip's
* DMA buffers come from wifi_dma_pool. The chip's 0.85 V and 1.8 V PCIe
* rails (S2MPG13 LDO3 and LDO18) are always on.
*/
&pcie_1 {
status = "okay";
pinctrl-0 = <&pcie1_clkreq>, <&pcie1_perst>, <&wlan_dev_wake>,
<&wlan_host_wake>;
pinctrl-names = "default";

pcie@0,0 {
compatible = "pciclass,0604";
device_type = "pci";
reg = <0x0 0x0 0x0 0x0 0x0>;
bus-range = <0x01 0xff>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
vpcie3v3-supply = <&wlan_pwr>;

wifi@0,0 {
compatible = "pci14e4,4441";
reg = <0x10000 0x0 0x0 0x0 0x0>;
brcm,board-type = "google,gs201-panther";
memory-region = <&wifi_dma_pool>;
};
};
};

&pcie_1_phy {
status = "okay";
};

/*
* The window for the PCIe System MMU. The node stays disabled: the PCIe and
* UFS masters share its VID 0, so it cannot confine the Wi-Fi chip without
* also confining storage.
*/
&pcie_1_sysmmu {
google,dma-window = <&wifi_dma_pool>;
};

&pinctrl_hsi2 {
status = "okay";

wlan_reg_on: wlan-reg-on-pins {
samsung,pins = "gph2-4";
samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
samsung,pin-pud-pdn = <GS101_PIN_PULL_NONE>;
};

wlan_dev_wake: wlan-dev-wake-pins {
samsung,pins = "gph2-5";
samsung,pin-function = <GS101_PIN_FUNC_INPUT>;
samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
samsung,pin-pud-pdn = <GS101_PIN_PULL_DOWN>;
};
};