Skip to content

Commit

Permalink
ev11l78a: update devicetree definition of ev11l78a.
Browse files Browse the repository at this point in the history
This includes an important fix for RAM and Flash size (not all samd20 are
the same, but unlike the samc20 series there's no separate dtsi files
for the various sizes.)

In addition to that, it adds custom bindings for the EN_SINK output
in (which is what enables the actual sink for the board), and exposes the
1.5A and 3.0A indicators as LEDs (even though they are just test points)
and enables the DAC.

Signed-off-by: Diego Elio Pettenò <[email protected]>
  • Loading branch information
Flameeyes committed Aug 22, 2023
1 parent c93020e commit a622e1e
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 2 deletions.
2 changes: 2 additions & 0 deletions boards/arm/ev11l78a/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ features:
+-----------+------------+------------------------------------------+
| ADC | on-chip | Analog-to-Digital Converter |
+-----------+------------+------------------------------------------+
| DAC | on-chip | Digital-to-Analog Converter |
+-----------+------------+------------------------------------------+

Other hardware features are not currently supported by Zephyr.

Expand Down
13 changes: 13 additions & 0 deletions boards/arm/ev11l78a/dts/bindings/microchip,ev11l78a-ensink.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2023, Meta Platforms, Inc. and its affiliates.
# SPDX-License-Identifier: Apache-2.0

description: GPIO used to enable the power Sink on the EV11L78A board

compatible: "microchip,ev11l78a-ensink"

properties:
gpios:
type: phandle-array
required: true
description: |
GPIO to enable the power sink on the EV11L78A board, output.
6 changes: 6 additions & 0 deletions boards/arm/ev11l78a/ev11l78a-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@
<PA5B_ADC_AIN5>;
};
};

dac_default: dac_default {
group1 {
pinmux = <PA2B_DAC_VOUT>;
};
};
};
26 changes: 25 additions & 1 deletion boards/arm/ev11l78a/ev11l78a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

/dts-v1/;
#include <freq.h>
#include <mem.h>
#include <freq.h>
#include <atmel/samd20.dtsi>
#include <atmel/samd2xx16.dtsi>
#include "ev11l78a-pinctrl.dtsi"
Expand Down Expand Up @@ -34,6 +34,18 @@
gpios = <&porta 23 GPIO_ACTIVE_HIGH>;
label = "CAP_MIS";
};

// The following are not LEDs on the board, but rather
// testpoints. On the other hand, they are "fit the part."
ind_1_5a: led_1 {
gpios = <&porta 1 GPIO_ACTIVE_HIGH>;
label = "1.5A_IND";
};

ind_3_0a: led_2 {
gpios = <&porta 15 GPIO_ACTIVE_HIGH>;
label = "3.0A_IND";
};
};

csa_i_sense: i_sense {
Expand All @@ -43,6 +55,11 @@
sense-gain-mult = <100>;
};

enable_sink: enable_sink {
compatible = "microchip,ev11l78a-ensink";
gpios = <&porta 22 GPIO_ACTIVE_HIGH>;
};

};

&cpu0 {
Expand Down Expand Up @@ -122,3 +139,10 @@
pinctrl-0 = <&adc_default>;
pinctrl-names = "default";
};

&dac0 {
status = "okay";

pinctrl-0 = <&dac_default>;
pinctrl-names = "default";
};
1 change: 1 addition & 0 deletions boards/arm/ev11l78a/ev11l78a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ toolchain:
- xtools
supported:
- adc
- dac
- gpio
- i2c
- spi
Expand Down
3 changes: 2 additions & 1 deletion tests/drivers/dac/dac_api/src/test_dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
defined(CONFIG_BOARD_FRDM_K22F) || \
defined(CONFIG_BOARD_SEEEDUINO_XIAO) || \
defined(CONFIG_BOARD_ARDUINO_MKRZERO) || \
defined(CONFIG_BOARD_ARDUINO_ZERO)
defined(CONFIG_BOARD_ARDUINO_ZERO) || \
defined(CONFIG_BOARD_EV11L78A)

#define DAC_DEVICE_NODE DT_NODELABEL(dac0)
#define DAC_RESOLUTION 12
Expand Down

0 comments on commit a622e1e

Please sign in to comment.