Move to standard Zephyr T2 workspace structure (star topology)
https://docs.zephyrproject.org/latest/guides/west/workspaces.html Previously, west manifest and CMake entry point were in zephyr subfolder as required for PlatformIO. As PlatformIO support was dropped, we can follow the default Zephyr folder structure more closely. The application is built and flashed from app subfolder, where as unit tests are run from tests subfolder.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Copyright (c) The Libre Solar Project Contributors
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: Description for an ADC input including gain (multiplier/divider) and offset
|
||||
|
||||
compatible: "adc-inputs"
|
||||
|
||||
child-binding:
|
||||
description: ADC inputs child node
|
||||
properties:
|
||||
io-channels:
|
||||
type: phandle-array
|
||||
required: true
|
||||
description: |
|
||||
ADC channel for this input.
|
||||
|
||||
multiplier:
|
||||
type: int
|
||||
required: true
|
||||
description: |
|
||||
Resistance of the lower leg of the voltage divider.
|
||||
|
||||
divider:
|
||||
type: int
|
||||
required: true
|
||||
description: |
|
||||
Resistance of the full path through the voltage divider.
|
||||
|
||||
offset:
|
||||
type: int
|
||||
required: false
|
||||
description: |
|
||||
Offset to be substracted from ADC raw reading before applying the gain
|
||||
|
||||
filter-const:
|
||||
type: int
|
||||
default: 5
|
||||
description: Low-pass filter multiplier 1/(2^filter-const)
|
||||
|
||||
enable-gpios:
|
||||
type: phandle-array
|
||||
required: false
|
||||
description: |
|
||||
Enable the voltage divider input or amplifier.
|
||||
|
||||
If present the corresponding GPIO must be set to an active level
|
||||
to enable the divider input.
|
||||
@@ -0,0 +1,62 @@
|
||||
# Copyright (c) The Libre Solar Project Contributors
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: Generic charge controller device setup
|
||||
|
||||
compatible: "charge-controller"
|
||||
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
required: true
|
||||
description: Device type
|
||||
version-str:
|
||||
type: string
|
||||
required: true
|
||||
description: Hardware version number (human-readable)
|
||||
version-num:
|
||||
type: int
|
||||
required: true
|
||||
description: Hardware version number (usable in preprocessor defines)
|
||||
hs-voltage-max:
|
||||
type: int
|
||||
required: true
|
||||
description: Maximum voltage at high-side (typically PV input) in volts
|
||||
ls-voltage-max:
|
||||
type: int
|
||||
required: true
|
||||
description: Maximum voltage at low-side (typically battery) in volts
|
||||
dcdc-current-max:
|
||||
type: int
|
||||
description: Maximum inductor current in amps (if existing in the charge controller)
|
||||
internal-tref-max:
|
||||
type: int
|
||||
default: 50
|
||||
description: |
|
||||
Internal reference temperature at full load (°C)
|
||||
|
||||
This value is used for model-based control of overcurrent protection. It represents
|
||||
the steady-state internal temperature for max. continuous current at ambient
|
||||
temperature of 25°C. Default value is conservative and can be overwritten in PCB
|
||||
configuration.
|
||||
mosfets-tj-max:
|
||||
type: int
|
||||
default: 120
|
||||
description: |
|
||||
Maximum Tj of MOSFETs (°C)
|
||||
|
||||
This value is used for model-based control of overcurrent protection. It represents
|
||||
the steady-state junction temperature for max. continuous current at ambient
|
||||
temperature of 25°C.
|
||||
mosfets-tau-ja:
|
||||
type: int
|
||||
default: 5
|
||||
description: |
|
||||
Thermal time constant junction to ambient (s)
|
||||
|
||||
This value is used for model-based control of overcurrent protection. It does not reflect
|
||||
the much lower MOSFET-internal time constant junction to case, but includes thermal
|
||||
inertia of the board.
|
||||
|
||||
Around 5s seems to be a good conservative estimation for 5x6 type SMD MOSFETs. Take larger
|
||||
values for big heat sinks.
|
||||
@@ -0,0 +1,19 @@
|
||||
# Copyright (c) The Libre Solar Project Contributors
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: Description for an ADC input including gain (multiplier/divider) and offset
|
||||
|
||||
compatible: "charlieplexing-leds"
|
||||
|
||||
properties:
|
||||
gpios:
|
||||
type: phandle-array
|
||||
description: GPIO handle of pin
|
||||
|
||||
child-binding:
|
||||
description: GPIO child node
|
||||
properties:
|
||||
states:
|
||||
type: array
|
||||
description: |
|
||||
Pin states to switch on LED identified by child node. 1=on, 0=off, 2=floating
|
||||
@@ -0,0 +1,28 @@
|
||||
# Copyright (c) The Libre Solar Project Contributors
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: Half bridge, consisting of two coupled PWM outputs
|
||||
|
||||
compatible: "half-bridge"
|
||||
|
||||
include: base.yaml
|
||||
|
||||
properties:
|
||||
frequency:
|
||||
type: int
|
||||
required: true
|
||||
description: PWM frequency in Hz
|
||||
|
||||
deadtime:
|
||||
type: int
|
||||
required: true
|
||||
description: Dead time for synchronous PWM generation in nanoseconds
|
||||
|
||||
pinctrl-0:
|
||||
type: phandles
|
||||
required: false
|
||||
description: |
|
||||
GPIO pin configuration for PWM signal/s. We expect that the phandles
|
||||
will reference pinctrl nodes, e.g.
|
||||
|
||||
pinctrl-0 = <&tim1_ch1_pwm_pa8 &tim1_ch2_pwm_pa9>;
|
||||
@@ -0,0 +1,29 @@
|
||||
# Copyright (c) The Libre Solar Project Contributors
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: GPIOs used for digital output (either on/off type or PWM signal)
|
||||
|
||||
compatible: "outputs"
|
||||
|
||||
child-binding:
|
||||
description: GPIO digital outputs child node
|
||||
properties:
|
||||
gpios:
|
||||
type: phandle-array
|
||||
description: GPIO handle for on/off type output
|
||||
pwms:
|
||||
type: phandle-array
|
||||
description: PWM handle for PWM type output
|
||||
latching-pgood:
|
||||
type: boolean
|
||||
description: Driver for latching power good pin (optional)
|
||||
current-max:
|
||||
type: int
|
||||
description: Maximum current of driven power switch (A)
|
||||
label:
|
||||
type: string
|
||||
required: true
|
||||
description: Human readable string describing the device (used by Zephyr for API name)
|
||||
kconfig-flag:
|
||||
type: boolean
|
||||
description: This value can be checked by Kconfig parser using dt_node_has_bool_prop function
|
||||
@@ -0,0 +1,15 @@
|
||||
# Copyright (c) The Libre Solar Project Contributors
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: ADC similar to STM32 for unit tests
|
||||
|
||||
compatible: "zephyr,dummy-adc"
|
||||
|
||||
include: adc-controller.yaml
|
||||
|
||||
properties:
|
||||
"#io-channel-cells":
|
||||
const: 1
|
||||
|
||||
io-channel-cells:
|
||||
- input
|
||||
@@ -0,0 +1,21 @@
|
||||
# Copyright (c) The Libre Solar Project Contributors
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: PWM similar to STM32 for unit tests
|
||||
|
||||
compatible: "zephyr,dummy-pwm"
|
||||
|
||||
include: [pwm-controller.yaml, base.yaml]
|
||||
|
||||
properties:
|
||||
label:
|
||||
required: true
|
||||
|
||||
"#pwm-cells":
|
||||
const: 3
|
||||
|
||||
pwm-cells:
|
||||
- channel
|
||||
# period in terms of nanoseconds
|
||||
- period
|
||||
- flags
|
||||
Reference in New Issue
Block a user