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 3f7283e commit 4418970
Show file tree
Hide file tree
Showing 5 changed files with 55 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>;
};
};
};
35 changes: 33 additions & 2 deletions boards/arm/ev11l78a/ev11l78a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

/dts-v1/;
#include <mem.h>
#include <freq.h>
#include <atmel/samd20.dtsi>
#include "ev11l78a-pinctrl.dtsi"
Expand Down Expand Up @@ -32,6 +33,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 @@ -41,6 +54,11 @@
sense-gain-mult = <100>;
};

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

};

&cpu0 {
Expand Down Expand Up @@ -83,7 +101,13 @@
pinctrl-names = "default";
};

&sram0 {
reg = <0x20000000 DT_SIZE_K(8)>;
};

&flash0 {
reg = <0 DT_SIZE_K(64)>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
Expand All @@ -94,9 +118,9 @@
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@3c000 {
storage_partition: partition@c000 {
label = "storage";
reg = <0x0003c000 0x00004000>;
reg = <0x0000c000 DT_SIZE_K(16)>;
};
};
};
Expand All @@ -120,3 +144,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

0 comments on commit 4418970

Please sign in to comment.