Skip to contentSkip to conversation

ARM: dts: imx6ull: Add chargebyte Tarragon support

PATCH Applied Stefan Wahren 7 participants 19 messages Apr 4, 2023 – Apr 15, 2023

Subsystems (5)

v5 of 6 Applied Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 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 V5:
- allow child nodes in DS2482 binding as noted by Krzysztof and Rob

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  |  44 +
 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, 1106 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 v5 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
#3 lore raw

PATCH v5 2/6 dt-bindings: w1: Add DS2482/DS2484 I2C to 1-W bridges

In reply to Stefan Wahren

This adds a dedicated devicetree binding for the Maxim DS2482/DS2484 I2C to 1-W bridges, which can be extended later for further features (e.g. sleep mode control GPIO). Since one wire is a bus, child nodes needs to be allowed here.

---
 .../devicetree/bindings/w1/maxim,ds2482.yaml  | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/w1/maxim,ds2482.yaml
Documentation/devicetree/bindings/w1/maxim,ds2482.yaml new file +44 -0
new file mode 100644
index 000000000000..422becc6e1fa
@@ -0,0 +1,44 @@
+# 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:
+  type: object
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      onewire@18 {
+        compatible = "maxim,ds2484";
+        reg = <0x18>;
+      };
+    };
Signature · 1 line
2.17.1
Reviewed-by on v5 2/6
#4 lore raw

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

Quoted 7 lines · Stefan Wahren

This adds a dedicated devicetree binding for the Maxim DS2482/DS2484 I2C to 1-W bridges, which can be extended later for further features (e.g. sleep mode control GPIO). Since one wire is a bus, child nodes needs to be allowed here.

---

Best regards,
Krzysztof

maintainer Reviewed-by on v5 2/6
#5 lore raw

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

In reply to Stefan Wahren
Quoted 10 lines · Stefan Wahren

This adds a dedicated devicetree binding for the Maxim DS2482/DS2484 I2C to 1-W bridges, which can be extended later for further features (e.g. sleep mode control GPIO). Since one wire is a bus, child nodes needs to be allowed here.

---
 .../devicetree/bindings/w1/maxim,ds2482.yaml  | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/w1/maxim,ds2482.yaml
#6 lore raw

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

Hi Greg,

Am 04.04.23 um 15:39 schrieb Rob Herring:

Quoted 6 lines · Stefan Wahren
Quoted 5 lines

This adds a dedicated devicetree binding for the Maxim DS2482/DS2484 I2C to 1-W bridges, which can be extended later for further features (e.g. sleep mode control GPIO). Since one wire is a bus, child nodes needs to be allowed here.

Quoted 7 lines
Quoted 5 lines
---
  .../devicetree/bindings/w1/maxim,ds2482.yaml  | 44 +++++++++++++++++++
  1 file changed, 44 insertions(+)

create mode 100644 Documentation/devicetree/bindings/w1/maxim,ds2482.yaml

Shawn Guo applied all patches from this series [1] except of this one and patch 3, which probably should go via your 1-w tree?

Unfortunately no feedback from Evgeniy so far. Should i resend these two patches for you?

Best regards
Stefan

[1] - https://lore.kernel.org/linux-arm-kernel/[email protected]/T/

Quoted 5 lines

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#7 lore raw

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

Quoted 15 lines · Stefan Wahren

Hi Greg,

Am 04.04.23 um 15:39 schrieb Rob Herring:

Quoted 12 lines · Stefan Wahren
Quoted 10 lines

This adds a dedicated devicetree binding for the Maxim DS2482/DS2484 I2C to 1-W bridges, which can be extended later for further features (e.g. sleep mode control GPIO). Since one wire is a bus, child nodes needs to be allowed here.

---
  .../devicetree/bindings/w1/maxim,ds2482.yaml  | 44 +++++++++++++++++++
  1 file changed, 44 insertions(+)

create mode 100644 Documentation/devicetree/bindings/w1/maxim,ds2482.yaml

Quoted 7 lines
Quoted 1 line

Shawn Guo applied all patches from this series [1] except of this one and patch 3, which probably should go via your 1-w tree?

Unfortunately no feedback from Evgeniy so far. Should i resend these two patches for you?

Please do.

thanks,

greg k-h

#8 lore raw

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

Stefan, Greg, hi

Quoted 5 lines · Greg Kroah-Hartman
Quoted 2 lines · Stefan Wahren

Unfortunately no feedback from Evgeniy so far. Should i resend these two patches for you?

Please do.

Thank you for the patches Stefan, but I'm no longer a w1 maintainer, sorry I haven't updated the maintainers file, please send all w1 patches to Greg.

#9 lore raw

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

Quoted 4 lines · Evgeniy Polyakov

Stefan, Greg, hi

Quoted 1 line · Greg Kroah-Hartman

On Thu, Apr 06, 2023 at 11:53:28AM +0200, Stefan Wahren wrote:

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Unfortunately no feedback from Evgeniy so far. Should i resend these two patches for you?

Please do.

Thank you for the patches Stefan, but I'm no longer a w1 maintainer, sorry I haven't updated the maintainers file, please send all w1 patches to Greg.

Thanks Evgeniy.

If the one-wire subsystem is orphaned, I can manage the patches to offload Greg a bit.

Best regards,
Krzysztof

#10 lore raw

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

Quoted 10 lines · Krzysztof Kozlowski
Quoted 9 lines · Evgeniy Polyakov

Stefan, Greg, hi

Quoted 5 lines · Greg Kroah-Hartman
Quoted 2 lines · Stefan Wahren

Unfortunately no feedback from Evgeniy so far. Should i resend these two patches for you?

Please do.

Quoted 8 lines
Quoted 3 lines

Thank you for the patches Stefan, but I'm no longer a w1 maintainer, sorry I haven't updated the maintainers file, please send all w1 patches to Greg.

Thanks Evgeniy.

If the one-wire subsystem is orphaned, I can manage the patches to offload Greg a bit.

There was not feedback on my proposal, which I am optimistically going to understand as "go ahead". :)

I'll send a patch, assuming Evgeniy that you are not planning to maintain w1 anymore and a new maintainer would be useful.

Best regards,
Krzysztof

#11 lore raw

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

Hi Krzysztof

Quoted 6 lines · Krzysztof Kozlowski
Quoted 6 lines
Quoted 3 lines

Thank you for the patches Stefan, but I'm no longer a w1 maintainer, sorry I haven't updated the maintainers file, please send all w1 patches to Greg.

Thanks Evgeniy.

Quoted 8 lines
Quoted 2 lines

If the one-wire subsystem is orphaned, I can manage the patches to offload Greg a bit.

There was not feedback on my proposal, which I am optimistically going to understand as "go ahead". :)

I'll send a patch, assuming Evgeniy that you are not planning to maintain w1 anymore and a new maintainer would be useful.

Greg has been managing all the w1 patches for last years and as far as I understand, in particular since I stepped out, I'm totally not against anyone picking up the queue from him or doing it the way I've been doing through his tree, but please discuss it with him and come up with the solution which works best, I have no word in it.

Thank you.

#12 lore raw

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

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

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

Quoted 9 lines · Stefan Wahren

Hi,

Am 06.04.23 um 03:46 schrieb Shawn Guo:

Quoted 6 lines · Stefan Wahren
Quoted 4 lines

This adds the compatibles for the chargebyte Tarragon boards.

Quoted 7 lines
Quoted 1 line

Applied 4 ~ 6, thanks!

thanks a lot.

What happens to patch 2 & 3?

Who take care of them?

I guess the patches need to be applied through w1 subsystem. Greg seems taking care of it from git history.

Shawn

#17 lore raw

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

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