Skip to content

Commit 68fedaf

Browse files
committed
ODROID-N2/C4: dtbs/dtbo: add PPS via GPIO pin #11/#12
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 <[email protected]> Change-Id: I2e13c8de7592bd117bb311f3fe2c1bc50901785e
1 parent bc5ec7e commit 68fedaf

File tree

7 files changed

+81
-1
lines changed

7 files changed

+81
-1
lines changed

arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ dtbo-$(CONFIG_ARCH_MESON64_ODROIDC4) += spi0.dtbo \
2020
esp8089.dtbo \
2121
sdio.dtbo \
2222
fanspeed-full.dtbo \
23+
pps-gpio_p11.dtbo \
24+
pps-gpio_p12.dtbo \
2325
pwm_ab.dtbo \
2426
pwm_cd.dtbo \
2527
pwm_ef.dtbo \
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
#include <dt-bindings/gpio/meson-g12a-gpio.h>
5+
#include <dt-bindings/gpio/gpio.h>
6+
7+
/ {
8+
fragment@0 {
9+
target-path = "/";
10+
11+
__overlay__ {
12+
pps: pps {
13+
compatible = "pps-gpio";
14+
gpios = <&gpio GPIOX_3 GPIO_ACTIVE_HIGH>;
15+
status = "okay";
16+
};
17+
};
18+
};
19+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
#include <dt-bindings/gpio/meson-g12a-gpio.h>
5+
#include <dt-bindings/gpio/gpio.h>
6+
7+
/ {
8+
fragment@0 {
9+
target-path = "/";
10+
11+
__overlay__ {
12+
pps: pps {
13+
compatible = "pps-gpio";
14+
gpios = <&gpio GPIOX_16 GPIO_ACTIVE_HIGH>;
15+
status = "okay";
16+
};
17+
};
18+
};
19+
};

arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ dtbo-$(CONFIG_ARCH_MESON64_ODROIDN2) += spi0.dtbo \
1818
fanspeed-full.dtbo \
1919
gpio_spdif.dtbo \
2020
pcf8563.dtbo \
21+
pps-gpio_p11.dtbo \
22+
pps-gpio_p12.dtbo \
2123
pwm_cd.dtbo \
2224
pwm_ef.dtbo \
2325
pwm_c-pwmfan.dtbo \
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
#include <dt-bindings/gpio/meson-g12a-gpio.h>
5+
#include <dt-bindings/gpio/gpio.h>
6+
7+
/ {
8+
fragment@0 {
9+
target-path = "/";
10+
11+
__overlay__ {
12+
pps: pps {
13+
compatible = "pps-gpio";
14+
gpios = <&gpio GPIOX_3 GPIO_ACTIVE_HIGH>;
15+
status = "okay";
16+
};
17+
};
18+
};
19+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
#include <dt-bindings/gpio/meson-g12a-gpio.h>
5+
#include <dt-bindings/gpio/gpio.h>
6+
7+
/ {
8+
fragment@0 {
9+
target-path = "/";
10+
11+
__overlay__ {
12+
pps: pps {
13+
compatible = "pps-gpio";
14+
gpios = <&gpio GPIOX_16 GPIO_ACTIVE_HIGH>;
15+
status = "okay";
16+
};
17+
};
18+
};
19+
};

arch/arm64/configs/odroidg12_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3327,7 +3327,7 @@ CONFIG_PPS=y
33273327
# CONFIG_PPS_CLIENT_KTIMER is not set
33283328
# CONFIG_PPS_CLIENT_LDISC is not set
33293329
# CONFIG_PPS_CLIENT_PARPORT is not set
3330-
# CONFIG_PPS_CLIENT_GPIO is not set
3330+
CONFIG_PPS_CLIENT_GPIO=y
33313331

33323332
#
33333333
# PPS generators support

0 commit comments

Comments
 (0)