Re: [PATCH 7/8] ARM: dts: imx6ull: Add chargebyte Tarragon support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/03/2023 18:22, Stefan Wahren wrote:
> From: Stefan Wahren <stefan.wahren@xxxxxxxxxxxxxx>
> 
> This adds the support for chargebyte Tarragon, which is an Electrical
> Vehicle Supply Equipment (EVSE) for AC charging stations
> (according to IEC 61851, ISO 15118).
> 
> The Tarragon board is based on an i.MX6ULL SoC and is available in
> 4 variants (Master, Slave, SlaveXT, Micro), which provide more or
> less peripherals.
> 
> Supported features:
>   * 512 MB DDR RAM
>   * eMMC
>   * Debug UART
>   * 100 Mbit Ethernet
>   * USB 2.0 Host interface
>   * Powerline communication (QCA700x)
>   * 2x RS485
>   * Digital in- and outputs (12 V)
>   * One-Wire master for external temp sensors
>   * 2x relay outputs
>   * 2x motor interfaces
> 
> Link: https://chargebyte.com/products/charging-station-communication/charge-control-c
> Signed-off-by: Stefan Wahren <stefan.wahren@xxxxxxxxxxxxxx>
> Signed-off-by: Stefan Wahren <stefan.wahren@xxxxxxxx>
> ---
>  arch/arm/boot/dts/Makefile                    |   4 +
>  .../arm/boot/dts/imx6ull-tarragon-common.dtsi | 858 ++++++++++++++++++
>  arch/arm/boot/dts/imx6ull-tarragon-master.dts |  82 ++
>  arch/arm/boot/dts/imx6ull-tarragon-micro.dts  |  10 +
>  arch/arm/boot/dts/imx6ull-tarragon-slave.dts  |  32 +
>  .../arm/boot/dts/imx6ull-tarragon-slavext.dts |  64 ++
>  6 files changed, 1050 insertions(+)
>  create mode 100644 arch/arm/boot/dts/imx6ull-tarragon-common.dtsi
>  create mode 100644 arch/arm/boot/dts/imx6ull-tarragon-master.dts
>  create mode 100644 arch/arm/boot/dts/imx6ull-tarragon-micro.dts
>  create mode 100644 arch/arm/boot/dts/imx6ull-tarragon-slave.dts
>  create mode 100644 arch/arm/boot/dts/imx6ull-tarragon-slavext.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index efe4152e5846..aae52a6380bc 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -755,6 +755,10 @@ dtb-$(CONFIG_SOC_IMX6UL) += \
>  	imx6ull-phytec-segin-lc-rdk-nand.dtb \
>  	imx6ull-phytec-tauri-emmc.dtb \
>  	imx6ull-phytec-tauri-nand.dtb \
> +	imx6ull-tarragon-master.dtb \
> +	imx6ull-tarragon-micro.dtb \
> +	imx6ull-tarragon-slave.dtb \
> +	imx6ull-tarragon-slavext.dtb \
>  	imx6ull-tqma6ull2-mba6ulx.dtb \
>  	imx6ull-tqma6ull2l-mba6ulx.dtb \
>  	imx6ulz-14x14-evk.dtb \
> diff --git a/arch/arm/boot/dts/imx6ull-tarragon-common.dtsi b/arch/arm/boot/dts/imx6ull-tarragon-common.dtsi
> new file mode 100644
> index 000000000000..1099dd688e80
> --- /dev/null
> +++ b/arch/arm/boot/dts/imx6ull-tarragon-common.dtsi
> @@ -0,0 +1,858 @@
> +// SPDX-License-Identifier: GPL-2.0 OR MIT
> +//
> +// Copyright (C) 2023 chargebyte GmbH
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/pwm/pwm.h>
> +#include "imx6ull.dtsi"
> +
> +/ {
> +	aliases {
> +		mmc0 = &usdhc2; /* eMMC */
> +	};
> +
> +	chosen {
> +		stdout-path = &uart4;
> +	};
> +
> +	memory@80000000 {
> +		device_type = "memory";
> +		reg = <0x80000000 0x20000000>;
> +	};
> +
> +	emmc_pwrseq: emmc-pwrseq {
> +		compatible = "mmc-pwrseq-emmc";
> +		pinctrl-0 = <&pinctrl_emmc_rst>;
> +		pinctrl-names = "default";
> +		reset-gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
> +	};
> +
> +	reg_dcdc_3v3: regulator-dcdc-3v3 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "dcdc-3v3";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-boot-on;
> +		regulator-always-on;
> +	};
> +
> +	reg_1v8: regulator-1v8 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "ldo-1v8";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +		regulator-boot-on;
> +		regulator-always-on;
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_status_leds>;
> +
> +		led1 {

Does not look like you tested the DTS against bindings. Please run `make
dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst
for instructions).

> +			label = "evse:green:led1";

Drop the label.

> +			function = LED_FUNCTION_BOOT;
> +			color = <LED_COLOR_ID_GREEN>;
> +			gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "timer";
> +		};
> +
> +		led2 {
> +			label = "evse:yellow:led2";

Drop the label.

> +			function = LED_FUNCTION_PROGRAMMING;
> +			color = <LED_COLOR_ID_YELLOW>;
> +			gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		led3 {
> +			label = "evse:red:led3";

Drop the label.

> +			function = LED_FUNCTION_HEARTBEAT;
> +			color = <LED_COLOR_ID_RED>;
> +			gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "heartbeat";
> +		};
> +	};
> +};

(...)

> +};
> +
> +&usdhc2 {
> +	pinctrl-names = "default", "state_100mhz", "state_200mhz";
> +	pinctrl-0 = <&pinctrl_usdhc2>;
> +	pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
> +	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
> +	vmmc-supply = <&sw2_reg>;
> +	vqmmc-supply = <&reg_1v8>;
> +	mmc-pwrseq = <&emmc_pwrseq>;
> +	bus-width = <8>;
> +	broken-cd;
> +	non-removable;

Hm, isn't polling for CD a contradictory to non-removable card? Few
other boards also have it but it looks wrong.

> +	status = "okay";
> +};
> +
> +&wdog1 {
> +	status = "disabled";
> +};


Best regards,
Krzysztof




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux