From d39052cacbb810c5786c6c3a282e9c9afb3c44f5 Mon Sep 17 00:00:00 2001 From: Nascs Fang Date: Fri, 19 Apr 2024 10:19:42 +0800 Subject: [PATCH] radxa zero: add pwm overlays Signed-off-by: Nascs Fang --- arch/arm64/boot/dts/amlogic/overlays/Makefile | 1 + .../amlogic/overlays/meson-g12-pwm-f-h.dts | 2 +- .../amlogic/overlays/meson-g12-pwmao-c.dts | 20 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/amlogic/overlays/meson-g12-pwmao-c.dts diff --git a/arch/arm64/boot/dts/amlogic/overlays/Makefile b/arch/arm64/boot/dts/amlogic/overlays/Makefile index 0d42160a..94d8e3c3 100644 --- a/arch/arm64/boot/dts/amlogic/overlays/Makefile +++ b/arch/arm64/boot/dts/amlogic/overlays/Makefile @@ -20,6 +20,7 @@ dtb-$(CONFIG_ARCH_MESON) += \ meson-g12-pwm-d-z.dtbo \ meson-g12-pwm-f-h.dtbo \ meson-g12-pwmao-a.dtbo \ + meson-g12-pwmao-c.dtbo \ meson-g12-spdif.dtbo \ meson-g12-spi-a-spidev.dtbo \ meson-g12-spi-b-enc28j60.dtbo \ diff --git a/arch/arm64/boot/dts/amlogic/overlays/meson-g12-pwm-f-h.dts b/arch/arm64/boot/dts/amlogic/overlays/meson-g12-pwm-f-h.dts index 6bb68c79..23e0442f 100644 --- a/arch/arm64/boot/dts/amlogic/overlays/meson-g12-pwm-f-h.dts +++ b/arch/arm64/boot/dts/amlogic/overlays/meson-g12-pwm-f-h.dts @@ -4,7 +4,7 @@ / { metadata { title = "Enable PWM-F on GPIOH_5"; - compatible = "radxa,zero2"; + compatible = "radxa,zero", "radxa,zero2"; category = "misc"; exclusive = "pwm_ef", "GPIOH_5"; description = "Enable PWM-F on GPIOH_5."; diff --git a/arch/arm64/boot/dts/amlogic/overlays/meson-g12-pwmao-c.dts b/arch/arm64/boot/dts/amlogic/overlays/meson-g12-pwmao-c.dts new file mode 100644 index 00000000..1d774cf3 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/overlays/meson-g12-pwmao-c.dts @@ -0,0 +1,20 @@ +/dts-v1/; +/plugin/; + +/ { + metadata { + title = "Enable PWMAO_C on GPIOAO_4"; + compatible = "radxa,zero"; + category = "misc"; + exclusive = "pwm_AO_cd", "GPIOAO_4"; + description = "Enable PWMAO_C on GPIOAO_4."; + }; +}; + +&pwm_AO_cd { + status = "okay"; + pinctrl-0 = <&pwm_ao_c_4_pins>; + pinctrl-names = "default"; + clocks = <&xtal>; + clock-names = "clkin1"; +};