From 0e918e6b2e0e4101709f7ed5925787963af1ba8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Fri, 28 Feb 2020 13:24:21 +0100 Subject: [PATCH] Add pwm-out DTS binding and fix CONFIG_PWM The binding .yaml was forgotten in previous charge pump commit. CONFIG_PWM was moved from prj.conf to board_defconfig as not all boards need the PWM driver. --- .../arm/mppt_2420_hpx/mppt_2420_hpx_defconfig | 2 ++ zephyr/dts/bindings/pwm-out.yaml | 17 +++++++++++++++++ zephyr/prj.conf | 2 -- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 zephyr/dts/bindings/pwm-out.yaml diff --git a/boards/arm/mppt_2420_hpx/mppt_2420_hpx_defconfig b/boards/arm/mppt_2420_hpx/mppt_2420_hpx_defconfig index 15d017f..f2f5bfa 100644 --- a/boards/arm/mppt_2420_hpx/mppt_2420_hpx_defconfig +++ b/boards/arm/mppt_2420_hpx/mppt_2420_hpx_defconfig @@ -55,3 +55,5 @@ CONFIG_UART_CONSOLE=y # Enable MPU CONFIG_ARM_MPU=y + +CONFIG_PWM=y diff --git a/zephyr/dts/bindings/pwm-out.yaml b/zephyr/dts/bindings/pwm-out.yaml new file mode 100644 index 0000000..877fd27 --- /dev/null +++ b/zephyr/dts/bindings/pwm-out.yaml @@ -0,0 +1,17 @@ +# Copyright (c) 2020 Martin Jäger / Libre Solar +# SPDX-License-Identifier: Apache-2.0 + +description: GPIO pins to generate a PWM signal + +compatible: "pwm-out" + +child-binding: + description: PWM output child node + properties: + pwms: + type: phandle-array + required: true + label: + type: string + required: true + description: Human readable string describing the device (used by Zephyr for API name) diff --git a/zephyr/prj.conf b/zephyr/prj.conf index 0de7ec0..16d7342 100644 --- a/zephyr/prj.conf +++ b/zephyr/prj.conf @@ -12,8 +12,6 @@ CONFIG_I2C_1=y CONFIG_ADC=y CONFIG_ADC_1=y -CONFIG_PWM=y - # disable log by default to save memory for STM32F0 with little RAM CONFIG_LOG=y CONFIG_LOG_MINIMAL=y