Yes, this working great, here are the overlay rising edge changes -
/*
* Copyright (c) 2022 Da Xue
* Author: Da Xue <da@libre.computer>
*
* SPDX-License-Identifier: (GPL-2.0+ OR MIT)
*/
/*
* Overlay aimed to create pps-gpio on 7J1 pin 12 (GPIOAO_6)
* This requires an GPIO to IRQ enabled kernel and will not work without one.
*/
/*
* Edited to switch interrupt to rising edge
*
/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/meson-gxl-gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/meson-gic.h>
/ {
compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
fragment@0 {
target-path = "/";
__overlay__ {
pps_gpio: pps-gpio {
compatible = "pps-gpio";
pinctrl-names = "default";
pinctrl-o = <&spdif_out_ao_6_pins>;
gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;
interrupts = <&gpio_intc MESON_GIC_GXL_GPIOAO_6 IRQ_TYPE_EDGE_RISING>;
assert-rising-edge;
status = "okay";
};
};
};
};
This is the version I used, have trouble with the includes -
/*
* Copyright (c) 2022 Da Xue
* Author: Da Xue <da@libre.computer>
*
* SPDX-License-Identifier: (GPL-2.0+ OR MIT)
*/
/*
* Overlay aimed to create pps-gpio on 7J1 pin 12 (GPIOAO_6)
* This requires an GPIO to IRQ enabled kernel and will not work without one.
*/
/*
* Modified to switch to rising edge interrupt and
* Modified to remove symbols so can be compiled without includes
*/
/dts-v1/;
/plugin/;
/*
#include "/boot/mydt/dt-bindings/gpio/gpio.h"
#include "/boot/mydt/dt-bindings/gpio/meson-gxl-gpio.h"
#include "/boot/mydt/dt-bindings/interrupt-controller/irq.h"
#include "/boot/mydt/dt-bindings/interrupt-controller/meson-gic.h"
*/
/ {
compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
fragment@0 {
target-path = "/";
__overlay__ {
pps_gpio: pps-gpio {
compatible = "pps-gpio";
pinctrl-names = "default";
pinctrl-o = <&spdif_out_ao_6_pins>;
gpios = <&gpio_ao 6 0>; /* =<&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>; */
interrupts = <&gpio_intc 6 1>; /* =<&gpio_intc MESON_GIC_GXL_GPIOAO_6 IRQ_TYPE_EDGE_RISING>; */
assert-rising-edge;
status = "okay";
};
};
};
};
Compile the above with this command -
#dtc -I dts -O dtb pps-gpio-7j1-12-rising.dts -o pps-gpio-7j1-12-rising.dtbo
Copy into place prior to merge where ever your overlays are located ??libretech-wiring-tool/libre-computer/aml-s905x-cc/dt/