Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ properties:
- enum:
- infineon,cyw43439-bt
- const: brcm,bcm4329-bt
- items:
- const: brcm,bcm4398-bt
- const: brcm,bcm4389-bt
- enum:
- brcm,bcm20702a1
- brcm,bcm4329-bt
Expand Down Expand Up @@ -57,7 +60,7 @@ properties:
maxItems: 1
description: GPIO specifier for the clock of the flip-flop that holds
BT_REG_ON on boards that latch it (the BCM4383 on the Google Pixel
9a). BT_REG_ON only reaches the chip on a rising edge of this line.
9a and the BCM4398 on the Pixel 8 Pro). BT_REG_ON only reaches the chip on a rising edge of this line.

host-wakeup-gpios:
maxItems: 1
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/serial/samsung_uart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ properties:
- items:
- enum:
- google,gs201-uart
- google,zuma-uart
- google,zumapro-uart
- samsung,exynos2200-uart
- const: google,gs101-uart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ properties:
- google,gs201-peric0-sysreg
- google,gs201-peric1-sysreg
- google,gs201-vgpio2ap-sysreg
- google,zuma-apm-sysreg
- google,zuma-hsi0-sysreg
- google,zuma-peric1-sysreg
- google,zuma-ufs-sysreg
Expand Down Expand Up @@ -118,6 +119,7 @@ allOf:
- google,gs201-hsi2-sysreg
- google,gs201-peric0-sysreg
- google,gs201-peric1-sysreg
- google,zuma-apm-sysreg
- google,zuma-peric1-sysreg
- google,zumapro-apm-sysreg
- google,zumapro-hsi0-sysreg
Expand Down
38 changes: 38 additions & 0 deletions arch/arm64/boot/dts/exynos/google/zuma-husky.dts
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,41 @@
read-only;
};
};

/*
* Bluetooth, on the APM's USI1 UART (0x155d0000) as in Google's GPL zuma
* Bluetooth DT: BT_REG_ON gpn8-0, BT_DEV_WAKE gpn9-0, BT_HOST_WAKE gpn6-0,
* the UART pads gpa3-0 to gpa3-3 in function 2, and gpp24-3 clocking the
* flip-flop that latches BT_REG_ON (the 9a's BCM4383 has the same).
*
* The chip answers as a BCM4398D0, the Bluetooth half of the Wi-Fi combo.
* hci_bcm has no entry for it; the BCM4389's (30 ms after REG_ON) works.
* btbcm loads the stock firmware as brcm/BCM.google,zuma-husky.hcd, taken
* from the owner's own image, never shipped. Without the file the controller
* stays in its ROM state.
*/
&sysreg_apm {
status = "okay";
};

&usi_apm1 {
status = "okay";
};

&uart18 {
status = "okay";
pinctrl-0 = <&uart18_bus>;
pinctrl-names = "default";

bluetooth {
compatible = "brcm,bcm4398-bt", "brcm,bcm4389-bt";
pinctrl-names = "default";
pinctrl-0 = <&bt_power &bt_ble_dbo &bt_host_wake>;
max-speed = <3000000>;
shutdown-gpios = <&gpn8 0 GPIO_ACTIVE_HIGH>;
device-wakeup-gpios = <&gpn9 0 GPIO_ACTIVE_HIGH>;
brcm,ble-dbo-gpios = <&gpp24 3 GPIO_ACTIVE_HIGH>;
interrupts-extended = <&gpn6 0 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "host-wakeup";
};
};
41 changes: 41 additions & 0 deletions arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@
<GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
};

/*
* The APM USI1 UART (Bluetooth): gpa3-0..3 in function 2, as Google's
* uart18_bus.
*/
uart18_bus: uart18-bus-pins {
samsung,pins = "gpa3-0", "gpa3-1", "gpa3-2", "gpa3-3";
samsung,pin-function = <GS101_PIN_FUNC_2>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

key_power: key-power-pins {
samsung,pins = "gpa4-0";
samsung,pin-function = <GS101_PIN_FUNC_EINT>;
Expand Down Expand Up @@ -273,6 +284,25 @@
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
};

/*
* Bluetooth: BT_REG_ON gpn8-0 and BT_DEV_WAKE gpn9-0, from Google's
* zuma-board-bluetooth.dtsi.
*/
bt_power: bt-power-pins {
samsung,pins = "gpn8-0", "gpn9-0";
samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

/* BT_HOST_WAKE: gpn6-0 as an interrupt, pulled down (function F in stock). */
bt_host_wake: bt-host-wake-pins {
samsung,pins = "gpn6-0";
samsung,pin-function = <GS101_PIN_FUNC_EINT>;
samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

ts_irq: ts-irq-pins {
samsung,pins = "gpn0-0";
samsung,pin-function = <GS101_PIN_FUNC_EINT>;
Expand Down Expand Up @@ -459,6 +489,17 @@
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

/*
* BT_BLE_DBO_LE: the clock of the flip-flop that latches BT_REG_ON
* (Google's bt_ble_dbo_le, an input at reset).
*/
bt_ble_dbo: bt-ble-dbo-pins {
samsung,pins = "gpp24-3";
samsung,pin-function = <GS101_PIN_FUNC_INPUT>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

/* USI9, the battery pack EEPROM's bus: gpp19-4/5, no pull as in stock. */
hsi2c9_bus: hsi2c9-bus-pins {
samsung,pins = "gpp19-4", "gpp19-5";
Expand Down
35 changes: 35 additions & 0 deletions arch/arm64/boot/dts/exynos/google/zuma.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,41 @@
clock-names = "oscclk";
};

sysreg_apm: syscon@154204e0 {
compatible = "google,zuma-apm-sysreg", "syscon";
/* Only the USI mode selectors. */
reg = <0x154204e0 0x8>;
clocks = <&cmu_apm CLK_GOUT_APM_SYSREG>;
status = "disabled";
};

/* The APM's USI1, the UART of the Bluetooth chip on the 8 Pro. */
usi_apm1: usi@155d00c0 {
compatible = "google,zuma-usi", "samsung,exynos850-usi";
reg = <0x155d00c0 0x20>;
clocks = <&cmu_apm CLK_GOUT_APM_USI1_UART_PCLK>,
<&cmu_apm CLK_GOUT_APM_USI1_UART_IPCLK>;
clock-names = "pclk", "ipclk";
samsung,sysreg = <&sysreg_apm 0x4>;
samsung,mode = <USI_MODE_UART>;
samsung,clkreq-on;
#address-cells = <1>;
#size-cells = <1>;
ranges;
status = "disabled";

uart18: serial@155d0000 {
compatible = "google,zuma-uart", "google,gs101-uart";
reg = <0x155d0000 0xc0>;
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cmu_apm CLK_GOUT_APM_USI1_UART_PCLK>,
<&cmu_apm CLK_GOUT_APM_USI1_UART_IPCLK>;
clock-names = "uart", "clk_uart_baud0";
samsung,uart-fifosize = <256>;
status = "disabled";
};
};

/* Writes go through EL3 (SMC), as on gs101. */
pmu_system_controller: system-controller@15460000 {
compatible = "google,zuma-pmu";
Expand Down
12 changes: 11 additions & 1 deletion drivers/clk/samsung/clk-zuma.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ static const struct samsung_mux_clock apm_muxes[] __initconst = {
static const struct samsung_div_clock apm_dividers[] __initconst = {
DIV_F(CLK_DOUT_APM_NOC, "zuma_dout_apm_noc", "zuma_gout_apm_func",
0x1808, 0, 3, 0, CLK_DIVIDER_READ_ONLY),
DIV_F(CLK_DOUT_APM_USI1_UART, "zuma_dout_apm_usi1_uart",
"zuma_gout_apm_func", 0x1818, 0, 7, 0, CLK_DIVIDER_READ_ONLY),
};

static const struct samsung_gate_clock apm_ro_gates[] __initconst = {
Expand All @@ -160,6 +162,14 @@ static const struct samsung_gate_clock apm_ro_gates[] __initconst = {
"zuma_dout_apm_noc", 0x20dc, 21, CLK_IGNORE_UNUSED, 0),
GATE(CLK_GOUT_APM_GPIO_CUSTOM_ALIVE, "zuma_gout_apm_gpio_custom_alive",
"zuma_dout_apm_noc", 0x2000, 21, CLK_IGNORE_UNUSED, 0),
GATE(CLK_GOUT_APM_USI1_UART_IPCLK, "zuma_gout_apm_usi1_uart_ipclk",
"zuma_dout_apm_usi1_uart", 0x20f4, 21, CLK_IGNORE_UNUSED, 0),
GATE(CLK_GOUT_APM_USI1_UART_PCLK, "zuma_gout_apm_usi1_uart_pclk",
"zuma_dout_apm_noc", 0x20f8, 21, CLK_IGNORE_UNUSED, 0),
GATE(CLK_GOUT_APM_USI1_UART_RSTNSYNC, "zuma_gout_apm_usi1_uart_rstnsync",
"zuma_dout_apm_usi1_uart", 0x2148, 21, CLK_IGNORE_UNUSED, 0),
GATE(CLK_GOUT_APM_SYSREG, "zuma_gout_apm_sysreg", "zuma_dout_apm_noc",
0x2168, 21, CLK_IGNORE_UNUSED, 0),
};

static const struct samsung_cmu_info apm_cmu __initconst = {
Expand All @@ -171,7 +181,7 @@ static const struct samsung_cmu_info apm_cmu __initconst = {
.nr_div_clks = ARRAY_SIZE(apm_dividers),
.ro_gate_clks = apm_ro_gates,
.nr_ro_gate_clks = ARRAY_SIZE(apm_ro_gates),
.nr_clk_ids = CLK_GOUT_APM_GPIO_CUSTOM_ALIVE + 1,
.nr_clk_ids = CLK_GOUT_APM_SYSREG + 1,
};

/* CMU_HSI0, 0x11000000. Firmware keeps the domain powered. */
Expand Down
7 changes: 6 additions & 1 deletion include/dt-bindings/clock/google,zuma.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#define CLK_GOUT_PERIC1_USI9_PCLK 12
#define CLK_GOUT_PERIC1_USI9_RSTNSYNC 13

/* CMU_APM: the APM mailbox, its SRAM and the always-on GPIO banks. */
/* CMU_APM: the APM mailbox, its SRAM, the always-on GPIO banks, the USI1 UART and the SYSREG. */
#define CLK_APM_PLL_ALV_DIV2 1
#define CLK_APM_PLL_ALV_DIV4 2
#define CLK_APM_PLL_ALV_DIV8 3
Expand All @@ -70,5 +70,10 @@
#define CLK_GOUT_APM_GPIO_ALIVE 12
#define CLK_GOUT_APM_GPIO_FAR_ALIVE 13
#define CLK_GOUT_APM_GPIO_CUSTOM_ALIVE 14
#define CLK_DOUT_APM_USI1_UART 15
#define CLK_GOUT_APM_USI1_UART_IPCLK 16
#define CLK_GOUT_APM_USI1_UART_PCLK 17
#define CLK_GOUT_APM_USI1_UART_RSTNSYNC 18
#define CLK_GOUT_APM_SYSREG 19

#endif /* _DT_BINDINGS_CLOCK_GOOGLE_ZUMA_H */