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
6 changes: 3 additions & 3 deletions Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ properties:
'#clock-cells':
const: 1
description:
On the Exynos SoCs, one clock per CLKOUT mux input. On the Tensor G4
PMU (google,zumapro-pmu), clock 0 is the NFC controller's reference
clock pad.
On the Exynos SoCs, one clock per CLKOUT mux input. On the Tensor G3
and G4 PMUs (google,zuma-pmu, google,zumapro-pmu), clock 0 is the NFC
controller's reference clock pad.

clock-names:
description:
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 @@ -398,6 +398,20 @@
*/
&pinctrl_hsi1 {
status = "okay";

nfc_en: nfc-en-pins {
samsung,pins = "gph1-6";
samsung,pin-pud = <GS101_PIN_PULL_NONE>;
samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
samsung,pin-pud-pdn = <GS101_PIN_PULL_NONE>;
};

nfc_pidle: nfc-pidle-pins {
samsung,pins = "gph1-3";
samsung,pin-pud = <GS101_PIN_PULL_DOWN>;
samsung,pin-con-pdn = <GS101_PIN_PDN_PREV>;
samsung,pin-pud-pdn = <GS101_PIN_PULL_DOWN>;
};
};

&usi0 {
Expand All @@ -421,6 +435,30 @@
cirrus,lra-redc-micro-ohms = <13000000>;
cirrus,vpbr-threshold-microvolt = <3008000>;
};

/*
* The ST54L NFC controller at 0x08 on this bus: plain NCI over I2C,
* nxp-nci's transport, as on the 9a and the zumapro-tegu node. Pins
* from the stock DT: interrupt gpa7-6, enable (the chip's RST_N)
* gph1-6, power-idle gph1-3. The pin groups are stock's and set only
* the power-down state (and the power-idle pull-down), no pin
* function. The chip's reference clock is the PMU's NFC pad (stock:
* pmu_clk_pad 0x3e84), clock 0 of the PMU node; without it the 9a's
* ST54L does not ACK its I2C address (on the 8 Pro the chip did answer
* without the pad and only found no tag, in one run). The eSE half of
* the chip (spi_12, reset gph1-5) is not described. Disabled: nothing
* binds to it until a bring-up overlay enables it.
*/
nfc: nfc@8 {
compatible = "st,st54l", "nxp,nxp-nci-i2c";
reg = <0x08>;
clocks = <&pmu_system_controller 0>;
interrupts-extended = <&gpa7 6 IRQ_TYPE_LEVEL_HIGH>;
enable-gpios = <&gph1 6 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&nfc_en &nfc_pidle>;
pinctrl-names = "default";
status = "disabled";
};
};

/*
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/exynos/google/zuma.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@
pmu_system_controller: system-controller@15460000 {
compatible = "google,zuma-pmu";
reg = <0x15460000 0x10000>;
#clock-cells = <1>;

/*
* The bootloader reads the reboot reason from SYSIP_DAT0,
Expand Down
18 changes: 11 additions & 7 deletions drivers/clk/samsung/clk-exynos-clkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@
#define GS101_CLKOUT_EN BIT(0)

/*
* Tensor G4 (zumapro) feeds the NFC controller's reference clock from a PMU
* pad as well. With EXTPAD_EN set the PMU follows the controller's clock
* request line and drives the clock onto the pad, which is how Google's
* st21nfc driver runs it (pmu_clk_pad = <0x3e84>, st,extpad_control_en);
* without it the Pixel 9a's ST54L does not ACK its I2C address. Nothing
* else about this register is known, so its source field is left alone.
* Tensor G3 (zuma) and G4 (zumapro) feed the NFC controller's reference
* clock from a PMU pad as well. With EXTPAD_EN set the PMU follows the
* controller's clock request line and drives the clock onto the pad, which
* is how Google's st21nfc driver runs it (pmu_clk_pad = <0x3e84>,
* st,extpad_control_en); without it the Pixel 9a's ST54L does not ACK its
* I2C address. Nothing else about this register is known, so its source
* field is left alone.
*/
#define ZUMAPRO_PAD_CTRL_NFC_CLK 0x3e84
#define ZUMAPRO_CLKOUT_EXTPAD_EN BIT(16)
Expand Down Expand Up @@ -163,6 +164,9 @@ static const struct of_device_id exynos_clkout_ids[] = {
}, {
.compatible = "google,gs201-pmu",
.data = &exynos_clkout_gs101,
}, {
.compatible = "google,zuma-pmu",
.data = &exynos_clkout_zumapro,
}, {
.compatible = "google,zumapro-pmu",
.data = &exynos_clkout_zumapro,
Expand Down Expand Up @@ -264,7 +268,7 @@ static const struct clk_ops exynos_clkout_pad_ops = {
};

/*
* GS101/GS201 and Tensor G4: one gate per pad, parented to mux input 0 (the
* GS101/GS201 and Tensor G3/G4: one gate per pad, parented to mux input 0 (the
* TCXO, named "clkout0" in the PMU node) where the PMU node names it; a pad
* whose source the node does not describe is a root clock. The pads may be
* in use by devices that Linux does not describe, so leave them as the
Expand Down
2 changes: 1 addition & 1 deletion drivers/soc/samsung/gs101-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static const struct regmap_range zuma_pmu_registers[] = {
regmap_reg_range(ZUMA_PHY_CTRL_UFS, ZUMA_PHY_CTRL_UFS),
/* a hint TF-A reads, not a status register: see zuma_pmu_regmap_init() */
regmap_reg_range(ZUMA_PMU_INFORM0, ZUMA_PMU_INFORM0),
/* Tensor G4's NFC reference clock pad, a clock of clk-exynos-clkout */
/* Tensor G3 and G4's NFC reference clock pad (clk-exynos-clkout) */
regmap_reg_range(ZUMA_PAD_CTRL_NFC_CLK, ZUMA_PAD_CTRL_NFC_CLK),
};

Expand Down