Skip to content

Commit

Permalink
ODROID-N2/C4: dtbs/dtbo: add PPS via GPIO pin #11/#12
Browse files Browse the repository at this point in the history
This patch addes two device tree overlay files in order to run PPS via
GPIO pins populated in GPIO pin header #11 and #12. By adding the device
tree overlay file to 'config.ini', the driver will be enabled and PPS
will be registered.

In 'config.ini',

	overlays="pps-gpio_p12"

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I2e13c8de7592bd117bb311f3fe2c1bc50901785e
  • Loading branch information
tobetter committed Jun 12, 2023
1 parent bc5ec7e commit 68fedaf
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 1 deletion.
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ dtbo-$(CONFIG_ARCH_MESON64_ODROIDC4) += spi0.dtbo \
esp8089.dtbo \
sdio.dtbo \
fanspeed-full.dtbo \
pps-gpio_p11.dtbo \
pps-gpio_p12.dtbo \
pwm_ab.dtbo \
pwm_cd.dtbo \
pwm_ef.dtbo \
Expand Down
19 changes: 19 additions & 0 deletions arch/arm64/boot/dts/amlogic/overlays/odroidc4/pps-gpio_p11.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/meson-g12a-gpio.h>
#include <dt-bindings/gpio/gpio.h>

/ {
fragment@0 {
target-path = "/";

__overlay__ {
pps: pps {
compatible = "pps-gpio";
gpios = <&gpio GPIOX_3 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};
};
};
19 changes: 19 additions & 0 deletions arch/arm64/boot/dts/amlogic/overlays/odroidc4/pps-gpio_p12.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/meson-g12a-gpio.h>
#include <dt-bindings/gpio/gpio.h>

/ {
fragment@0 {
target-path = "/";

__overlay__ {
pps: pps {
compatible = "pps-gpio";
gpios = <&gpio GPIOX_16 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};
};
};
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ dtbo-$(CONFIG_ARCH_MESON64_ODROIDN2) += spi0.dtbo \
fanspeed-full.dtbo \
gpio_spdif.dtbo \
pcf8563.dtbo \
pps-gpio_p11.dtbo \
pps-gpio_p12.dtbo \
pwm_cd.dtbo \
pwm_ef.dtbo \
pwm_c-pwmfan.dtbo \
Expand Down
19 changes: 19 additions & 0 deletions arch/arm64/boot/dts/amlogic/overlays/odroidn2/pps-gpio_p11.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/meson-g12a-gpio.h>
#include <dt-bindings/gpio/gpio.h>

/ {
fragment@0 {
target-path = "/";

__overlay__ {
pps: pps {
compatible = "pps-gpio";
gpios = <&gpio GPIOX_3 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};
};
};
19 changes: 19 additions & 0 deletions arch/arm64/boot/dts/amlogic/overlays/odroidn2/pps-gpio_p12.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/meson-g12a-gpio.h>
#include <dt-bindings/gpio/gpio.h>

/ {
fragment@0 {
target-path = "/";

__overlay__ {
pps: pps {
compatible = "pps-gpio";
gpios = <&gpio GPIOX_16 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};
};
};
2 changes: 1 addition & 1 deletion arch/arm64/configs/odroidg12_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3327,7 +3327,7 @@ CONFIG_PPS=y
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
# CONFIG_PPS_CLIENT_PARPORT is not set
# CONFIG_PPS_CLIENT_GPIO is not set
CONFIG_PPS_CLIENT_GPIO=y

#
# PPS generators support
Expand Down

0 comments on commit 68fedaf

Please sign in to comment.