Skip to contentSkip to conversation

ARM: dts: imx6ull: Add chargebyte Tarragon support

PATCH Superseded Stefan Wahren 3 participants 9 messages Mar 31, 2023 – Apr 3, 2023

Subsystems (5)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v4 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 V4:
- introduce dedicated dt-binding for Maxim I2C to 1-W bridges
- add Krzysztof's Acked-by

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: w1: Add DS2482/DS2484 I2C to 1-W bridges
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/vendor-prefixes.yaml  |   2 +
 .../devicetree/bindings/w1/maxim,ds2482.yaml  |  43 +
 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, 1105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/w1/maxim,ds2482.yaml
 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 v4 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 v4 2/6 dt-bindings: w1: Add DS2482/DS2484 I2C to 1-W bridges

In reply to Stefan Wahren

Even this binding look trivial, the actual hardware supports more features (e.g. sleep mode control GPIO). So add this as a dedicated devicetree binding for the Maxim DS2482/DS2484 I2C to 1-W bridges, which can be extended later.

---
 .../devicetree/bindings/w1/maxim,ds2482.yaml  | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/w1/maxim,ds2482.yaml
Documentation/devicetree/bindings/w1/maxim,ds2482.yaml new file +43 -0
new file mode 100644
index 000000000000..fd692a3a7400
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/w1/maxim,ds2482.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim One wire bus master controller
+
+maintainers:
+  - Stefan Wahren <[email protected]>
+
+description: |
+  I2C to 1-wire bridges
+
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ds2482-100.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/DS2482-800.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/DS2484.pdf
+
+properties:
+  compatible:
+    enum:
+      - maxim,ds2482
+      - maxim,ds2484
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      onewire@18 {
+        compatible = "maxim,ds2484";
+        reg = <0x18>;
+      };
+    };
Signature · 1 line
2.17.1
Reviewed-by on v4 2/6
#3 lore raw

Re: [PATCH V4 2/6] dt-bindings: w1: Add DS2482/DS2484 I2C to 1-W bridges

Quoted 17 lines · Stefan Wahren

Even this binding look trivial, the actual hardware supports more features (e.g. sleep mode control GPIO). So add this as a dedicated devicetree binding for the Maxim DS2482/DS2484 I2C to 1-W bridges, which can be extended later.

---
 .../devicetree/bindings/w1/maxim,ds2482.yaml  | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/w1/maxim,ds2482.yaml
Documentation/devicetree/bindings/w1/maxim,ds2482.yaml new file +0 -0
new file mode 100644
index 000000000000..fd692a3a7400

Documentation/devicetree/bindings/w1/maxim,ds2482.yaml line 3

Quoted 3 lines
Documentation/devicetree/bindings/w1/maxim,ds2482.yaml new file +3 -0
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---

This is still incomplete as it does not allow children, but you mentioned it in commit msg and other two bindings are limited as well, so sounds ok:

Best regards,
Krzysztof

maintainer
#4 lore raw

Re: [PATCH V4 2/6] dt-bindings: w1: Add DS2482/DS2484 I2C to 1-W bridges

In reply to Stefan Wahren
Quoted 39 lines · Stefan Wahren

Even this binding look trivial, the actual hardware supports more features (e.g. sleep mode control GPIO). So add this as a dedicated devicetree binding for the Maxim DS2482/DS2484 I2C to 1-W bridges, which can be extended later.

---
 .../devicetree/bindings/w1/maxim,ds2482.yaml  | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/w1/maxim,ds2482.yaml
Documentation/devicetree/bindings/w1/maxim,ds2482.yaml new file +22 -0
new file mode 100644
index 000000000000..fd692a3a7400
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/w1/maxim,ds2482.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim One wire bus master controller
+
+maintainers:
+  - Stefan Wahren <[email protected]>
+
+description: |
+  I2C to 1-wire bridges
+
+  https://www.analog.com/media/en/technical-documentation/data-sheets/ds2482-100.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/DS2482-800.pdf
+  https://www.analog.com/media/en/technical-documentation/data-sheets/DS2484.pdf
+
+properties:
+  compatible:
+    enum:
+      - maxim,ds2482

Documentation/devicetree/bindings/w1/maxim,ds2482.yaml line 32

Quoted 10 lines
Documentation/devicetree/bindings/w1/maxim,ds2482.yaml new file +10 -0
+      - maxim,ds2484
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false

To allow children, all that's needed for 1-wire is:

additionalProperties:
type: object

Quoted 14 lines
Documentation/devicetree/bindings/w1/maxim,ds2482.yaml new file +11 -0
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      onewire@18 {
+        compatible = "maxim,ds2484";
+        reg = <0x18>;
+      };
+    };
Signature · 1 line
2.17.1
#5 lore raw

PATCH v4 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 v4 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
#7 lore raw

PATCH v4 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
#8 lore raw

PATCH v4 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