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
17 changes: 17 additions & 0 deletions Documentation/devicetree/bindings/clock/google,zuma-clock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ properties:
- google,zuma-cmu-top
- google,zuma-cmu-apm
- google,zuma-cmu-hsi0
- google,zuma-cmu-peric0
- google,zuma-cmu-peric1

reg:
Expand Down Expand Up @@ -83,6 +84,22 @@ allOf:
- const: bus
- const: peri
- const: alt
- if:
properties:
compatible:
const: google,zuma-cmu-peric0
then:
properties:
clocks:
items:
- description: External oscillator reference clock
- description: PERIC0 NoC clock from CMU_TOP
- description: PERIC0 USI input clock from CMU_TOP
clock-names:
items:
- const: oscclk
- const: bus
- const: ip
- if:
properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ properties:
- google,gs201-vgpio2ap-sysreg
- google,zuma-apm-sysreg
- google,zuma-hsi0-sysreg
- google,zuma-peric0-sysreg
- google,zuma-peric1-sysreg
- google,zuma-ufs-sysreg
- google,zumapro-apm-sysreg
Expand Down Expand Up @@ -120,6 +121,7 @@ allOf:
- google,gs201-peric0-sysreg
- google,gs201-peric1-sysreg
- google,zuma-apm-sysreg
- google,zuma-peric0-sysreg
- google,zuma-peric1-sysreg
- google,zumapro-apm-sysreg
- google,zumapro-hsi0-sysreg
Expand Down
81 changes: 81 additions & 0 deletions arch/arm64/boot/dts/exynos/google/zuma-husky.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/usb/pd.h>
#include "zuma.dtsi"
Expand Down Expand Up @@ -382,3 +383,83 @@
interrupt-names = "host-wakeup";
};
};

/*
* Haptics: Cirrus Logic CS40L26A at 0x43 on PERIC1 USI0 (Google's I2C bus 0,
* 1 MHz in stock, 400 kHz here), INTb on gpa6-3, RESET on gph2-3 (the
* trigger line gph2-0 is claimed but unused). Boost and actuator values are
* the stock ones from Google's zuma-shusky-haptics.dtsi, as on the 7 Pro.
*/
/*
* The HSI1 pin controller is off in zuma.dtsi (HSI1 is the PCIe block, and
* reading a pin controller Linux does not own has aborted the SoC on gs101),
* so this board enables it for the haptics' reset and trigger lines. The
* interrupt, gpa6-3, is on an alive bank.
*/
&pinctrl_hsi1 {
status = "okay";
};

&usi0 {
status = "okay";
};

&hsi2c_0 {
clock-frequency = <400000>;
status = "okay";

haptics: haptic-driver@43 {
compatible = "cirrus,cs40l26a";
reg = <0x43>;
interrupts-extended = <&gpa6 3 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gph2 3 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&hapt_amp1_irq &hapt_amp1_rst &hapt_amp_trig>;
pinctrl-names = "default";
cirrus,boost-peak-microamp = <2500000>;
cirrus,boost-ctl-microvolt = <11000000>;
cirrus,lra-f0-hz = <145>;
cirrus,lra-redc-micro-ohms = <13000000>;
cirrus,vpbr-threshold-microvolt = <3008000>;
};
};

/*
* Rear flash LED: TI LM3644 at 0x63 on PERIC0 USI14 (Google's I2C bus 14,
* 390 kHz in stock, 400 kHz here), HWEN on gpp8-2. Stock drives it from the
* camera HAL through LWIS. Torch only; the cap is the 7 Pro's bring-up limit
* (50 mA per LED), not a stock value. CMU_PERIC0 and its sysreg are enabled
* here, as CMU_PERIC1 is for the haptics: the torch's I2C bus (USI14) sits
* on them.
*/
&cmu_peric0 {
status = "okay";
};

&sysreg_peric0 {
status = "okay";
};

&usi14 {
status = "okay";
};

&hsi2c_14 {
clock-frequency = <400000>;
/* The bus pins and HWEN's mux, as in Google's zuma-husky-camera.dtsi. */
pinctrl-0 = <&hsi2c14_bus &flash_en>;
pinctrl-names = "default";
status = "okay";

led-controller@63 {
compatible = "ti,lm3644";
reg = <0x63>;
enable-gpios = <&gpp8 2 GPIO_ACTIVE_HIGH>;

led {
function = LED_FUNCTION_TORCH;
color = <LED_COLOR_ID_WHITE>;
led-sources = <1 2>;
led-max-microamp = <50000>;
};
};
};
64 changes: 64 additions & 0 deletions arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@
samsung,pin-pud = <GS101_PIN_PULL_UP>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

/* Haptics INTb: gpa6-3 (XEINT_11), as stock. */
hapt_amp1_irq: hapt-amp1-irq-pins {
samsung,pins = "gpa6-3";
samsung,pin-function = <GS101_PIN_FUNC_EINT>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};
};

&pinctrl_custom_alive {
Expand Down Expand Up @@ -437,9 +445,65 @@
interrupt-controller;
#interrupt-cells = <2>;
};

/* USI14, the rear flash LED's bus: gpp16-0/1 in function 2, as stock. */
hsi2c14_bus: hsi2c14-bus-pins {
samsung,pins = "gpp16-0", "gpp16-1";
samsung,pin-function = <GS101_PIN_FUNC_2>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

/* The LM3644's HWEN (flashlight enable), gpp8-2; the LED driver takes it as a GPIO. */
flash_en: flash-en-pins {
samsung,pins = "gpp8-2";
samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};
};

&pinctrl_hsi1 {
gph0: gph0-gpio-bank {
gpio-controller;
#gpio-cells = <2>;
};

gph1: gph1-gpio-bank {
gpio-controller;
#gpio-cells = <2>;
};

gph2: gph2-gpio-bank {
gpio-controller;
#gpio-cells = <2>;
};

/* Haptics (CS40L26A): RESET gph2-3, TRIG gph2-0, from Google's zuma-shusky-haptics.dtsi. */
hapt_amp1_rst: hapt-amp1-rst-pins {
samsung,pins = "gph2-3";
samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

hapt_amp_trig: hapt-amp-trig-pins {
samsung,pins = "gph2-0";
samsung,pin-function = <GS101_PIN_FUNC_OUTPUT>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};
};

&pinctrl_peric1 {
/* USI0, the haptics driver's bus: gpp19-0/1 in function 3, as stock. */
hsi2c0_bus: hsi2c0-bus-pins {
samsung,pins = "gpp19-0", "gpp19-1";
samsung,pin-function = <GS101_PIN_FUNC_3>;
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};

gpp19: gpp19-gpio-bank {
gpio-controller;
#gpio-cells = <2>;
Expand Down
89 changes: 89 additions & 0 deletions arch/arm64/boot/dts/exynos/google/zuma.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
aliases {
pinctrl0 = &pinctrl_gpio_alive;
pinctrl1 = &pinctrl_custom_alive;
pinctrl8 = &pinctrl_hsi1;
pinctrl10 = &pinctrl_hsi2ufs;
pinctrl11 = &pinctrl_peric0;
pinctrl12 = &pinctrl_peric1;
Expand Down Expand Up @@ -347,6 +348,15 @@
interrupts = <GIC_SPI 634 IRQ_TYPE_LEVEL_HIGH>;
};

pinctrl_hsi1: pinctrl@12040000 {
compatible = "google,zuma-pinctrl";
reg = <0x12040000 0x1000>;
clocks = <&clk_gpio_stub>;
clock-names = "pclk";
interrupts = <GIC_SPI 413 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

pinctrl_peric1: pinctrl@10c40000 {
compatible = "google,zuma-pinctrl";
reg = <0x10c40000 0x1000>;
Expand All @@ -355,6 +365,54 @@
interrupts = <GIC_SPI 649 IRQ_TYPE_LEVEL_HIGH>;
};

/* CMU_PERIC0 and USI14, the I2C bus of the rear flash LED. */
cmu_peric0: clock-controller@10800000 {
compatible = "google,zuma-cmu-peric0";
reg = <0x10800000 0x8000>;
#clock-cells = <1>;
clocks = <&oscclk>, <&cmu_top CLK_DOUT_PERIC0_NOC>,
<&cmu_top CLK_DOUT_PERIC0_IP>;
clock-names = "oscclk", "bus", "ip";
status = "disabled";
};

sysreg_peric0: syscon@10821000 {
compatible = "google,zuma-peric0-sysreg", "syscon";
reg = <0x10821000 0x1000>;
clocks = <&cmu_peric0 CLK_GOUT_PERIC0_SYSREG>;
status = "disabled";
};

usi14: usi@109800c0 {
compatible = "google,zuma-usi", "samsung,exynos850-usi";
reg = <0x109800c0 0x20>;
clocks = <&cmu_peric0 CLK_GOUT_PERIC0_USI14_PCLK>,
<&cmu_peric0 CLK_GOUT_PERIC0_USI14_IPCLK>;
clock-names = "pclk", "ipclk";
samsung,sysreg = <&sysreg_peric0 0x28>;
samsung,mode = <USI_MODE_I2C>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
status = "disabled";

hsi2c_14: i2c@10980000 {
compatible = "google,zuma-hsi2c",
"samsung,exynosautov9-hsi2c";
/* USI control starts at 0xc0; do not claim it twice. */
reg = <0x10980000 0xc0>;
interrupts = <GIC_SPI 648 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cmu_peric0 CLK_GOUT_PERIC0_USI14_IPCLK>,
<&cmu_peric0 CLK_GOUT_PERIC0_USI14_PCLK>;
clock-names = "hsi2c", "hsi2c_pclk";
pinctrl-0 = <&hsi2c14_bus>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};

/*
* CMU_PERIC1 and USI11, the I2C bus of the MAX77759 gauge,
* charger and Type-C controller. Firmware leaves them running;
Expand Down Expand Up @@ -407,6 +465,37 @@
};
};

/* USI0 on PERIC1: the haptics driver's I2C bus on the 8 Pro. */
usi0: usi@10c800c0 {
compatible = "google,zuma-usi", "samsung,exynos850-usi";
reg = <0x10c800c0 0x20>;
clocks = <&cmu_peric1 CLK_GOUT_PERIC1_USI0_PCLK>,
<&cmu_peric1 CLK_GOUT_PERIC1_USI0_IPCLK>;
clock-names = "pclk", "ipclk";
samsung,sysreg = <&sysreg_peric1 0x0>;
samsung,mode = <USI_MODE_I2C>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
status = "disabled";

hsi2c_0: i2c@10c80000 {
compatible = "google,zuma-hsi2c",
"samsung,exynosautov9-hsi2c";
/* USI control starts at 0xc0; do not claim it twice. */
reg = <0x10c80000 0xc0>;
interrupts = <GIC_SPI 656 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cmu_peric1 CLK_GOUT_PERIC1_USI0_IPCLK>,
<&cmu_peric1 CLK_GOUT_PERIC1_USI0_PCLK>;
clock-names = "hsi2c", "hsi2c_pclk";
pinctrl-0 = <&hsi2c0_bus>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};

usi11: usi@10cb00c0 {
compatible = "google,zuma-usi", "samsung,exynos850-usi";
reg = <0x10cb00c0 0x20>;
Expand Down
Loading