diff --git a/Documentation/devicetree/bindings/mfd/samsung,s2mpg15-pmic.yaml b/Documentation/devicetree/bindings/mfd/samsung,s2mpg15-pmic.yaml index 90d7e84423..0d6ba7675e 100644 --- a/Documentation/devicetree/bindings/mfd/samsung,s2mpg15-pmic.yaml +++ b/Documentation/devicetree/bindings/mfd/samsung,s2mpg15-pmic.yaml @@ -10,7 +10,7 @@ maintainers: - W4HO <87742609+W4HO-ham@users.noreply.github.com> description: | - S2MPG15 is the sub PMIC paired with Google's Tensor G4 and is reached + S2MPG15 is the sub PMIC paired with Google's Tensor G3 and G4 and is reached through ACPM. Its LDOs supply the AoC sensors, the GNSS receiver, the camera sensors and the fingerprint sensor. Interrupt, meter, GPIO and RTC functions are not described here. diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mpg15-regulator.yaml b/Documentation/devicetree/bindings/regulator/samsung,s2mpg15-regulator.yaml index 4134157536..b2afeff2d6 100644 --- a/Documentation/devicetree/bindings/regulator/samsung,s2mpg15-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpg15-regulator.yaml @@ -10,7 +10,7 @@ maintainers: - W4HO <87742609+W4HO-ham@users.noreply.github.com> description: | - The sub-PMIC paired with Google's Tensor G4. LDO5S and LDO7S supply the + The sub-PMIC paired with Google's Tensor G3 and G4. LDO5S and LDO7S supply the AoC sensors, LDO9S, LDO10S and LDO11S the GNSS receiver's core, RF front end and auxiliary supply, LDO12S the camera sensors' 1.8 V and LDO15S the fingerprint sensor's 3.3 V. Enable control and voltage readback are diff --git a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts index bedcfcc527..be6b992bb0 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts +++ b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts @@ -327,6 +327,14 @@ samsung,pin-con-pdn = ; samsung,pin-pud-pdn = ; }; + + gnss_host_req: gnss-host-req-pins { + samsung,pins = "gpa5-3"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-con-pdn = ; + samsung,pin-pud-pdn = ; + }; }; &pinctrl_hsi2 { @@ -347,6 +355,32 @@ samsung,pin-con-pdn = ; samsung,pin-pud-pdn = ; }; + + gnss_mcu_resp: gnss-mcu-resp-pins { + samsung,pins = "gph3-2"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-con-pdn = ; + samsung,pin-pud-pdn = ; + }; + + gnss_nstandby: gnss-nstandby-pins { + samsung,pins = "gph3-3"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-con-pdn = ; + samsung,pin-pud-pdn = ; + }; +}; + +&pinctrl_peric0 { + gnss_mcu_req: gnss-mcu-req-pins { + samsung,pins = "gpp4-3"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-con-pdn = ; + samsung,pin-pud-pdn = ; + }; }; &spi20 { @@ -674,3 +708,40 @@ }; }; }; + +/* + * The BCM4775x GNSS receiver on HSI0 USI3 (Google's spi_21), as stock's + * bcm4775@0 and the Pixel 7 Pro's node. The lines are raw levels, because + * the driver drives nstandby with raw GPIO values (lhd writes 1 to run the + * chip), so nstandby is not marked active low as stock marks it. The bus + * and the sub-PMIC are disabled here, and a bring-up overlay enables them + * together with this node. Stock's spi-max-frequency (26 MHz) and feedback + * delay (1) are used as they are; its chip-select-mode property is not read + * by this tree's spi driver. + */ +&spi21 { + gnss@0 { + compatible = "brcm,bcm4775-gnss"; + reg = <0>; + spi-max-frequency = <26000000>; + spi-cpol; + spi-cpha; + interrupts-extended = <&gpa5 3 IRQ_TYPE_LEVEL_HIGH>; + nstandby-gpios = <&gph3 3 GPIO_ACTIVE_HIGH>; + mcu-req-gpios = <&gpp4 3 GPIO_ACTIVE_HIGH>; + mcu-resp-gpios = <&gph3 2 GPIO_ACTIVE_HIGH>; + host-req-gpios = <&gpa5 3 GPIO_ACTIVE_HIGH>; + vddcore-supply = <&ldo9s>; + vddrf-supply = <&ldo10s>; + vddaux-supply = <&ldo11s>; + pinctrl-names = "default"; + pinctrl-0 = <&gnss_nstandby &gnss_mcu_resp &gnss_mcu_req + &gnss_host_req>; + status = "disabled"; + + /* Stock's value; whether 26 MHz needs it is not known. */ + controller-data { + samsung,spi-feedback-delay = <1>; + }; + }; +};