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
50 changes: 50 additions & 0 deletions Documentation/devicetree/bindings/gnss/samsung,exynos-gnss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gnss/samsung,exynos-gnss.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung Kepler GNSS core, handshake lines

maintainers:
- W4HO <87742609+W4HO-ham@users.noreply.github.com>

description: |
The control side of the Kepler GNSS core's SPI link (samsung,gnss-spi):
two lines between the core and the host that pace the transfers. The
core raises its line while it has data for the host, and to answer the
host's request to write. The host raises its line to ask to write, and
pulses it to acknowledge the core's request before reading. The node has
no registers, clocks or supplies of its own.

properties:
compatible:
const: samsung,exynos-gnss

gnss2ap-spi-gpios:
maxItems: 1
description:
Core to host request line, active high. It is also the host's
interrupt, so its GPIO controller must be able to raise one.

ap2gnss-spi-gpios:
maxItems: 1
description:
Host to core request line, active high. Low when the host is idle.

required:
- compatible
- gnss2ap-spi-gpios
- ap2gnss-spi-gpios

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>

gnss {
compatible = "samsung,exynos-gnss";
gnss2ap-spi-gpios = <&gpa5 4 GPIO_ACTIVE_HIGH>;
ap2gnss-spi-gpios = <&gpp2 3 GPIO_ACTIVE_HIGH>;
};
52 changes: 52 additions & 0 deletions Documentation/devicetree/bindings/gnss/samsung,gnss-spi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gnss/samsung,gnss-spi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung Kepler GNSS core, SPI data link

maintainers:
- W4HO <87742609+W4HO-ham@users.noreply.github.com>

description: |
Samsung's Kepler GNSS core is part of the S5300 modem in the Google
Pixel 9a. It runs firmware that the host loads into the modem's shared
memory, and it exchanges its data with the host over an SPI bus of the
application processor (USI3 of HSI0 on Tensor G4), in blocks of 64
bytes. The core and its supplies belong to the modem; this node is only
the SPI device. The two lines that pace the transfers are described by
a samsung,exynos-gnss node.

allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
compatible:
const: samsung,gnss-spi

reg:
maxItems: 1

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;

gnss@0 {
compatible = "samsung,gnss-spi";
reg = <0>;
spi-max-frequency = <3125000>;

controller-data {
samsung,spi-feedback-delay = <0>;
};
};
};
1 change: 1 addition & 0 deletions drivers/soc/google/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ config GS201_AOC_ALSA
limits in device/cheetah/AUDIO-PLAN.md.

source "drivers/soc/google/cpif/Kconfig"
source "drivers/soc/google/gnssif_spi/Kconfig"

endmenu

Expand Down
1 change: 1 addition & 0 deletions drivers/soc/google/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ obj-$(CONFIG_GS201_AOC_RAILS) += gs201-aoc-rails.o
obj-$(CONFIG_GS201_CAM_POWER) += gs201-cam-power.o
obj-y += aoc/
obj-y += cpif/
obj-$(CONFIG_EXYNOS_GNSS_IF_SPI) += gnssif_spi/
14 changes: 14 additions & 0 deletions drivers/soc/google/gnssif_spi/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: GPL-2.0-only
config EXYNOS_GNSS_IF_SPI
tristate "Samsung Kepler GNSS interface over SPI"
depends on SPI && GPIOLIB && OF
select WANT_DEV_COREDUMP
help
Google's driver for the Kepler GNSS core in Samsung's S5300 modem,
as in the Pixel 9a. gnss_spi binds the core's SPI device, and
gnssif binds its two request lines and gives the GNSS daemon the
character device /dev/gnss_ipc. The core runs only while the modem
is up, with firmware the daemon loads through the modem driver.

To compile this driver as modules, choose M here: the modules will
be called gnss_spi and gnssif.
6 changes: 6 additions & 0 deletions drivers/soc/google/gnssif_spi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_EXYNOS_GNSS_IF_SPI) += gnss_spi.o

obj-$(CONFIG_EXYNOS_GNSS_IF_SPI) += gnssif.o
gnssif-y += gnss_main.o gnss_io_device.o gnss_keplerctl_device.o gnss_link_device.o
gnssif-y += gnss_utils.o
Loading
Loading