linux-loongson/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi
Raymond Hackley 834cfba678 arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add S3FWRN5 NFC
Some variants of Samsung Galaxy Core Prime LTE / Grand Prime LTE have a
Samsung S3FWRN5 NFC chip that works quite well with the s3fwrn5 driver
in the Linux NFC subsystem.

The clock setup for the NFC chip is a bit special (although this
seems to be a common approach used for Qualcomm devices with NFC):

The NFC chip has an output GPIO that is asserted whenever the clock
is needed to function properly. On the A3/A5 this is wired up to
PM8916 GPIO2, which is then configured with a special function
(NFC_CLK_REQ or BB_CLK2_REQ).

Enabling the rpmcc RPM_SMD_BB_CLK2_PIN clock will then instruct
PM8916 to automatically enable the clock whenever the NFC chip
requests it. The advantage is that the clock is only enabled when
needed and we don't need to manage it ourselves from the NFC driver.

Signed-off-by: Raymond Hackley <raymondhackley@protonmail.com>
Link: https://lore.kernel.org/r/20240601115321.25314-3-raymondhackley@protonmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-05 22:02:30 -05:00

47 lines
884 B
Plaintext

// SPDX-License-Identifier: GPL-2.0-only
#include "msm8916-samsung-fortuna-common.dtsi"
/* SM5504 MUIC instead of SM5502 */
/delete-node/ &muic;
/* Touchscreen varies depending on model variant */
/delete-node/ &touchscreen;
&blsp_i2c1 {
muic: extcon@14 {
compatible = "siliconmitus,sm5504-muic";
reg = <0x14>;
interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>;
pinctrl-0 = <&muic_int_default>;
pinctrl-names = "default";
usb_con: connector {
compatible = "usb-b-connector";
label = "micro-USB";
type = "micro";
};
};
};
/* On rossa backlight is controlled with MIPI DCS commands */
&clk_pwm {
status = "disabled";
};
&clk_pwm_backlight {
status = "disabled";
};
&s3fwrn5_nfc {
status = "okay";
};
&st_accel {
compatible = "st,lis2hh12";
mount-matrix = "1", "0", "0",
"0", "-1", "0",
"0", "0", "1";
status = "okay";
};