Skip to contentSkip to conversation

ARM: dts: imx6ull: Add chargebyte Tarragon support

PATCH Superseded Stefan Wahren 4 participants 10 messages Mar 31, 2023

Subsystems (5)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 cover ARM: dts: imx6ull: Add chargebyte Tarragon support

This series 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

The Tarragon hardware is bundled with a charging stack under the name Charge Control C:
https://chargebyte.com/products/charging-station-communication/charge-control-c

This series is rebased on top of:
https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git?h=for-next

Changes in V3:
- dropped already applied iio patches
- renamed pinctrl_qca700x_mains_spi to pinctrl_ecspi4
- dropped Tarragon container nodes as suggested by Shawn
- sort the pinctrl groups alphabetically also suggested by Shawn

Changes in V2:
- after fixing technical problems send patches directly from chargebyte address and drop the related signed-off-by
- add Krzysztof's Acked-by
- improve commit messages (patch 3, 4, 5)
- make iis328dq fallback to lis331dl as suggested by Jonathan
- fix order of Tarragon entries in FSL schema
- improve Tarragon led node names and drop label as suggested by Krzysztof
- change Tarragon SVNS pinctrl settings after internal discussion with chargebyte hardware team
- drop broken-cd in Tarragon common DTSI which is not necessary for eMMC
- add no-sd and no-sdio for eMMC interface of Tarragon

Stefan Wahren (6):
dt-bindings: vendor-prefixes: add chargebyte
dt-bindings: Add DS2482/DS2484 as trivial device
w1: ds2482: add i2c id for DS2484
dt-bindings: ARM: fsl: Add chargebyte Tarragon
ARM: dts: imx6ull: Add chargebyte Tarragon support
ARM: imx_v6_v7_defconfig: Enable Tarragon peripheral drivers

 .../devicetree/bindings/arm/fsl.yaml          |   9 +
 .../devicetree/bindings/trivial-devices.yaml  |   4 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm/boot/dts/Makefile                    |   4 +
 .../arm/boot/dts/imx6ull-tarragon-common.dtsi | 852 ++++++++++++++++++
 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 ++
 arch/arm/configs/imx_v6_v7_defconfig          |   6 +
 drivers/w1/masters/ds2482.c                   |   1 +
 11 files changed, 1066 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
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 1/6 dt-bindings: vendor-prefixes: add chargebyte

chargebyte supplies hardware and software products for all aspects of charging communication.
https://chargebyte.com/

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index ed64e06ecca4..b8d8fa1d1fd6 100644
@@ -240,6 +240,8 @@ patternProperties:
     description: CellWise Microelectronics Co., Ltd
   "^ceva,.*":
     description: Ceva, Inc.
+  "^chargebyte,.*":
+    description: chargebyte GmbH
   "^checkpoint,.*":
     description: Check Point Software Technologies Ltd.
   "^chefree,.*":
Signature · 1 line
2.17.1
#2 lore raw

PATCH v3 2/6 dt-bindings: Add DS2482/DS2484 as trivial device

In reply to Stefan Wahren

Both chips are I2C to 1-wire bridges.

---
 Documentation/devicetree/bindings/trivial-devices.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +4 -0
index 6f482a254a1d..9b7b24989359 100644
@@ -183,6 +183,10 @@ properties:
           - maxim,ds1803-050
             # 100 kOhm digital potentiometer with I2C interface
           - maxim,ds1803-100
+            # I2C to 1-wire bridge
+          - maxim,ds2482
+            # I2C to 1-wire bridge
+          - maxim,ds2484
             # 10 kOhm digital potentiometer with I2C interface
           - maxim,ds3502
             # Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs
Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH V3 2/6] dt-bindings: Add DS2482/DS2484 as trivial device

Quoted 15 lines · Stefan Wahren

Both chips are I2C to 1-wire bridges.

---
 Documentation/devicetree/bindings/trivial-devices.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +0 -0
index 6f482a254a1d..9b7b24989359 100644

Documentation/devicetree/bindings/trivial-devices.yaml properties: · line 189

Quoted 7 lines
Documentation/devicetree/bindings/trivial-devices.yaml +4 -0
@@ -183,6 +183,10 @@ properties:
           - maxim,ds1803-050
             # 100 kOhm digital potentiometer with I2C interface
           - maxim,ds1803-100
+            # I2C to 1-wire bridge
+          - maxim,ds2482
+            # I2C to 1-wire bridge
+          - maxim,ds2484

A 1-wire device isn't really trivial because it can have child nodes. You're probably not the first here, but don't add more.

You could do a "trivial 1-wire devices" schema similar to trivial RTC device schema.

Rob

#4 lore raw

Re: [PATCH V3 2/6] dt-bindings: Add DS2482/DS2484 as trivial device

Hi Rob,

Am 31.03.23 um 17:49 schrieb Rob Herring:

Quoted 28 lines
Quoted 15 lines · Stefan Wahren

Both chips are I2C to 1-wire bridges.

---
  Documentation/devicetree/bindings/trivial-devices.yaml | 4 ++++
  1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +0 -0
index 6f482a254a1d..9b7b24989359 100644

Documentation/devicetree/bindings/trivial-devices.yaml properties: · line 189

Quoted 7 lines
Documentation/devicetree/bindings/trivial-devices.yaml +4 -0
@@ -183,6 +183,10 @@ properties:
            - maxim,ds1803-050
              # 100 kOhm digital potentiometer with I2C interface
            - maxim,ds1803-100
+            # I2C to 1-wire bridge
+          - maxim,ds2482
+            # I2C to 1-wire bridge
+          - maxim,ds2484

A 1-wire device isn't really trivial because it can have child nodes. You're probably not the first here, but don't add more.

Quoted 2 lines

You could do a "trivial 1-wire devices" schema similar to trivial RTC device schema.

okay. After thinking more about this, it isn't a trivial device at all. I will make a dedicated schema for this.

Best regards

Quoted 2 lines

Rob

#5 lore raw

PATCH v3 3/6 w1: ds2482: add i2c id for DS2484

In reply to Stefan Wahren

The DS2484 is compatible to the DS2482-100, but also supports a pin-controlled power-saving sleep mode.

---
 drivers/w1/masters/ds2482.c | 1 +
 1 file changed, 1 insertion(+)
drivers/w1/masters/ds2482.c +1 -0
index 62c44616d8a9..6f6df686e9ad 100644
@@ -545,6 +545,7 @@ static void ds2482_remove(struct i2c_client *client)
  */
 static const struct i2c_device_id ds2482_id[] = {
 	{ "ds2482", 0 },
+	{ "ds2484", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ds2482_id);
Signature · 1 line
2.17.1
#6 lore raw

PATCH v3 4/6 dt-bindings: ARM: fsl: Add chargebyte Tarragon

In reply to Stefan Wahren

This adds the compatibles for the chargebyte Tarragon boards.

---
 Documentation/devicetree/bindings/arm/fsl.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/arm/fsl.yaml +9 -0
index b175f2b1bd30..7fac7f834814 100644
@@ -707,6 +707,15 @@ properties:
           - const: armadeus,imx6ull-opos6ul     # OPOS6UL (i.MX6ULL) SoM
           - const: fsl,imx6ull
 
+      - description: i.MX6ULL chargebyte Tarragon Boards
+        items:
+          - enum:
+              - chargebyte,imx6ull-tarragon-master
+              - chargebyte,imx6ull-tarragon-micro
+              - chargebyte,imx6ull-tarragon-slave
+              - chargebyte,imx6ull-tarragon-slavext
+          - const: fsl,imx6ull
+
       - description: i.MX6ULL DHCOM SoM based Boards
         items:
           - enum:
Signature · 1 line
2.17.1
Acked-by on v3 4/6
#7 lore raw

Re: [PATCH V3 4/6] dt-bindings: ARM: fsl: Add chargebyte Tarragon

Quoted 4 lines · Stefan Wahren

This adds the compatibles for the chargebyte Tarragon boards.

---

This is a friendly reminder during the review process.

It looks like you received a tag and forgot to add it.

If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply.

https://elixir.bootlin.com/linux/v5.17/source/Documentation/process/submitting-patches.rst#L540

If a tag was not added on purpose, please state why and what changed.

Best regards,
Krzysztof

#8 lore raw

PATCH v3 5/6 ARM: dts: imx6ull: Add chargebyte Tarragon support

In reply to Stefan Wahren

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

---
 arch/arm/boot/dts/Makefile                    |   4 +
 .../arm/boot/dts/imx6ull-tarragon-common.dtsi | 852 ++++++++++++++++++
 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, 1044 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
arch/arm/boot/dts/Makefile +4 -0
index fd4f7230cb55..404e6f5a1cc7 100644
@@ -760,6 +760,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 \
arch/arm/boot/dts/imx6ull-tarragon-common.dtsi new file +852 -0

852 lines not on this page · raw message

arch/arm/boot/dts/imx6ull-tarragon-master.dts new file +82 -0

82 lines not on this page · raw message

arch/arm/boot/dts/imx6ull-tarragon-micro.dts new file +10 -0
new file mode 100644
index 000000000000..e471c2005bee
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+//
+// Copyright (C) 2023 chargebyte GmbH
+
+#include "imx6ull-tarragon-common.dtsi"
+
+/ {
+	model = "chargebyte Tarragon Micro";
+	compatible = "chargebyte,imx6ull-tarragon-micro", "fsl,imx6ull";
+};
arch/arm/boot/dts/imx6ull-tarragon-slave.dts new file +32 -0
new file mode 100644
index 000000000000..cee223b5f8e1
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+//
+// Copyright (C) 2023 chargebyte GmbH
+
+#include "imx6ull-tarragon-common.dtsi"
+
+/ {
+	model = "chargebyte Tarragon Slave";
+	compatible = "chargebyte,imx6ull-tarragon-slave", "fsl,imx6ull";
+};
+
+&ecspi2 {
+	status = "okay";
+
+	qca700x_cp: ethernet@0 {
+		reg = <0x0>;
+		compatible = "qca,qca7000";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_qca700x_cp_int
+			     &pinctrl_qca700x_cp_rst
+			     &pinctrl_qca700x_cp_btld>;
+		interrupt-parent = <&gpio2>;
+		interrupts = <19 IRQ_TYPE_EDGE_RISING>;
+		spi-cpha;
+		spi-cpol;
+		spi-max-frequency = <16000000>;
+	};
+};
+
+&fec1 {
+	status = "okay";
+};
arch/arm/boot/dts/imx6ull-tarragon-slavext.dts new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
2.17.1
#9 lore raw

PATCH v3 6/6 ARM: imx_v6_v7_defconfig: Enable Tarragon peripheral drivers

In reply to Stefan Wahren

We need to enable some drivers in order to use the following peripherals of Tarragon:
* QCA7000/7005 Powerline chip
* One-Wire Master DS2484 with external thermal sensors
* external 4 pin PWM fan
* ST IIS328DQ I2C accelerometer

---
 arch/arm/configs/imx_v6_v7_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/configs/imx_v6_v7_defconfig +6 -0
index 9475839e7fe1..2e2af31eeb4c 100644
@@ -128,6 +128,7 @@ CONFIG_CS89x0_PLATFORM=y
 # CONFIG_NET_VENDOR_MICREL is not set
 # CONFIG_NET_VENDOR_MICROCHIP is not set
 # CONFIG_NET_VENDOR_NATSEMI is not set
+CONFIG_QCA7000_SPI=m
 # CONFIG_NET_VENDOR_SEEQ is not set
 CONFIG_SMC91X=y
 CONFIG_SMC911X=y
@@ -216,6 +217,9 @@ CONFIG_GPIO_PCF857X=y
 CONFIG_GPIO_BD71815=y
 CONFIG_GPIO_STMPE=y
 CONFIG_GPIO_74X164=y
+CONFIG_W1=m
+CONFIG_W1_MASTER_DS2482=m
+CONFIG_W1_SLAVE_THERM=m
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_SYSCON=y
 CONFIG_POWER_RESET_SYSCON_POWEROFF=y
@@ -224,6 +228,7 @@ CONFIG_RN5T618_POWER=m
 CONFIG_SENSORS_MC13783_ADC=y
 CONFIG_SENSORS_GPIO_FAN=y
 CONFIG_SENSORS_IIO_HWMON=y
+CONFIG_SENSORS_PWM_FAN=y
 CONFIG_SENSORS_SY7636A=y
 CONFIG_THERMAL_STATISTICS=y
 CONFIG_THERMAL_WRITABLE_TRIPS=y
@@ -409,6 +414,7 @@ CONFIG_CLK_IMX8MQ=y
 CONFIG_SOC_IMX8M=y
 CONFIG_EXTCON_USB_GPIO=y
 CONFIG_IIO=y
+CONFIG_IIO_ST_ACCEL_3AXIS=m
 CONFIG_MMA8452=y
 CONFIG_IMX7D_ADC=y
 CONFIG_RN5T618_ADC=y
Signature · 1 line
2.17.1