mbox series

[0/8] ARM: dts: imx6ull: Add chargebyte Tarragon support

Message ID 20230306172249.74003-1-stefan.wahren@i2se.com
Headers show
Series ARM: dts: imx6ull: Add chargebyte Tarragon support | expand

Message

Stefan Wahren March 6, 2023, 5:22 p.m. UTC
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

Stefan Wahren (8):
  dt-bindings: vendor-prefixes: add chargebyte
  dt-bindings: Add DS2482/DS2484 as trivial device
  w1: ds2482: add i2c id for ds2484
  dt-bindings: iio: st-sensors: Add IIS328DQ accelerometer
  iio: accel: add support for IIS328DQ variant
  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 +
 .../bindings/iio/st,st-sensors.yaml           |   1 +
 .../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 | 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 ++
 arch/arm/configs/imx_v6_v7_defconfig          |   6 +
 drivers/iio/accel/st_accel.h                  |   1 +
 drivers/iio/accel/st_accel_core.c             |   1 +
 drivers/iio/accel/st_accel_i2c.c              |   5 +
 drivers/iio/accel/st_accel_spi.c              |   5 +
 drivers/w1/masters/ds2482.c                   |   1 +
 16 files changed, 1085 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

Comments

Krzysztof Kozlowski March 7, 2023, 8:21 a.m. UTC | #1
On 06/03/2023 18:22, Stefan Wahren wrote:
> From: Stefan Wahren <stefan.wahren@chargebyte.com>
> 
> chargebyte supplies hardware and software products for all
> aspects of charging communication.
> https://chargebyte.com/
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Krzysztof Kozlowski March 7, 2023, 8:21 a.m. UTC | #2
On 06/03/2023 18:22, Stefan Wahren wrote:
> From: Stefan Wahren <stefan.wahren@chargebyte.com>
> 
> Both chips are I2C to 1-wire bridges.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Krzysztof Kozlowski March 7, 2023, 8:23 a.m. UTC | #3
On 06/03/2023 18:22, Stefan Wahren wrote:
> From: Stefan Wahren <stefan.wahren@chargebyte.com>
> 
> The ST IIS328DQ is an accelerometer sensor compatible with
> the existing ST sensor binding.

If it is compatible with existing binding, then make it compatible.
Although your driver change suggests it is not compatible...

Best regards,
Krzysztof
Krzysztof Kozlowski March 7, 2023, 8:24 a.m. UTC | #4
On 06/03/2023 18:22, Stefan Wahren wrote:
> From: Stefan Wahren <stefan.wahren@chargebyte.com>
> 
> This adds the compatibles for the chargebyte Tarragon boards.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  Documentation/devicetree/bindings/arm/fsl.yaml | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
> index dece3e9ba7fd..2b430e20a7a6 100644
> --- a/Documentation/devicetree/bindings/arm/fsl.yaml
> +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
> @@ -781,6 +781,15 @@ properties:
>            - const: tq,imx6ull-tqma6ull2l      # MCIMX6Y2, LGA SoM variant
>            - const: fsl,imx6ull
>  
> +      - description: chargebyte Tarragon Boards
> +        items:
> +          - enum:
> +              - chargebyte,imx6ull-tarragon-master
> +              - chargebyte,imx6ull-tarragon-micro
> +              - chargebyte,imx6ull-tarragon-slave
> +              - chargebyte,imx6ull-tarragon-slavext
> +          - const: fsl,imx6ull

I don't think you put it in correct place. Didn't you just stuff it at
the end?

Best regards,
Krzysztof
Krzysztof Kozlowski March 7, 2023, 8:30 a.m. UTC | #5
On 06/03/2023 18:22, Stefan Wahren wrote:
> From: Stefan Wahren <stefan.wahren@chargebyte.com>
> 
> 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@chargebyte.com>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  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
Stefan Wahren March 7, 2023, 5:25 p.m. UTC | #6
Hi Krzysztof,

Am 07.03.23 um 09:30 schrieb Krzysztof Kozlowski:
> On 06/03/2023 18:22, Stefan Wahren wrote:
>> From: Stefan Wahren <stefan.wahren@chargebyte.com>
>>
>> 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@chargebyte.com>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> ---
>>   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).

I ran make dtbs_check before sending this series. All of these issues in 
the included dtsi files makes it hard to spot DTS specific issues. This 
is the output of make dtbs_check:

   DTC_CHK arch/arm/boot/dts/imx6ull-tarragon-master.dtb
/home/stefanw/mainline/arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
nand-controller@1806000: #size-cells:0:0: 0 was expected
     From schema: 
/home/stefanw/mainline/Documentation/devicetree/bindings/mtd/nand-controller.yaml
/home/stefanw/mainline/arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
nand-controller@1806000: #size-cells:0:0: 0 was expected
     From schema: 
/home/stefanw/mainline/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/spba-bus@2000000/spi@200c000/ethernet@0: failed to 
match any schema with compatible: ['qca,qca7000']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/spba-bus@2000000/spi@2014000/ethernet@0: failed to 
match any schema with compatible: ['qca,qca7000']
/home/stefanw/mainline/arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
serial@2018000: Unevaluated properties are not allowed ('clock-names', 
'clocks' were unexpected)
     From schema: 
/home/stefanw/mainline/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml
/home/stefanw/mainline/arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
serial@2020000: Unevaluated properties are not allowed ('clock-names', 
'clocks' were unexpected)
     From schema: 
/home/stefanw/mainline/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/spba-bus@2000000/asrc@2034000: failed to match any 
schema with compatible: ['fsl,imx6ul-asrc', 'fsl,imx53-asrc']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/spba-bus@2000000/asrc@2034000: failed to match any 
schema with compatible: ['fsl,imx6ul-asrc', 'fsl,imx53-asrc']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/tsc@2040000: failed to match any schema with 
compatible: ['fsl,imx6ul-tsc']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/anatop@20c8000: failed to match any schema with 
compatible: ['fsl,imx6ul-anatop', 'fsl,imx6q-anatop', 'syscon', 
'simple-mfd']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/anatop@20c8000: failed to match any schema with 
compatible: ['fsl,imx6ul-anatop', 'fsl,imx6q-anatop', 'syscon', 
'simple-mfd']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/usbphy@20c9000: failed to match any schema with 
compatible: ['fsl,imx6ul-usbphy', 'fsl,imx23-usbphy']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/usbphy@20c9000: failed to match any schema with 
compatible: ['fsl,imx6ul-usbphy', 'fsl,imx23-usbphy']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/usbphy@20ca000: failed to match any schema with 
compatible: ['fsl,imx6ul-usbphy', 'fsl,imx23-usbphy']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/usbphy@20ca000: failed to match any schema with 
compatible: ['fsl,imx6ul-usbphy', 'fsl,imx23-usbphy']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/snvs@20cc000: failed to match any schema with 
compatible: ['fsl,sec-v4.0-mon', 'syscon', 'simple-mfd']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/snvs@20cc000/snvs-rtc-lp: failed to match any schema 
with compatible: ['fsl,sec-v4.0-mon-rtc-lp']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/snvs@20cc000/snvs-powerkey: failed to match any schema 
with compatible: ['fsl,sec-v4.0-pwrkey']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/pinctrl@20e0000: failed to match any schema with 
compatible: ['fsl,imx6ul-iomuxc']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/iomuxc-gpr@20e4000: failed to match any schema with 
compatible: ['fsl,imx6ul-iomuxc-gpr', 'fsl,imx6q-iomuxc-gpr', 'syscon']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2000000/iomuxc-gpr@20e4000: failed to match any schema with 
compatible: ['fsl,imx6ul-iomuxc-gpr', 'fsl,imx6q-iomuxc-gpr', 'syscon']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2100000/usb@2184000: failed to match any schema with 
compatible: ['fsl,imx6ul-usb', 'fsl,imx27-usb']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2100000/usb@2184000: failed to match any schema with 
compatible: ['fsl,imx6ul-usb', 'fsl,imx27-usb']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2100000/usb@2184200: failed to match any schema with 
compatible: ['fsl,imx6ul-usb', 'fsl,imx27-usb']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2100000/usb@2184200: failed to match any schema with 
compatible: ['fsl,imx6ul-usb', 'fsl,imx27-usb']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2100000/usbmisc@2184800: failed to match any schema with 
compatible: ['fsl,imx6ul-usbmisc', 'fsl,imx6q-usbmisc']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2100000/usbmisc@2184800: failed to match any schema with 
compatible: ['fsl,imx6ul-usbmisc', 'fsl,imx6q-usbmisc']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2100000/weim@21b8000: failed to match any schema with 
compatible: ['fsl,imx6ul-weim', 'fsl,imx6q-weim']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2100000/weim@21b8000: failed to match any schema with 
compatible: ['fsl,imx6ul-weim', 'fsl,imx6q-weim']
/home/stefanw/mainline/arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
serial@21f0000: Unevaluated properties are not allowed ('clock-names', 
'clocks' were unexpected)
     From schema: 
/home/stefanw/mainline/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml
/home/stefanw/mainline/arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
serial@21f4000: Unevaluated properties are not allowed ('clock-names', 
'clocks' were unexpected)
     From schema: 
/home/stefanw/mainline/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml
/home/stefanw/mainline/arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
serial@21fc000: Unevaluated properties are not allowed ('clock-names', 
'clocks' were unexpected)
     From schema: 
/home/stefanw/mainline/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
/soc/bus@2200000/iomuxc-snvs@2290000: failed to match any schema with 
compatible: ['fsl,imx6ull-iomuxc-snvs']
arch/arm/boot/dts/imx6ull-tarragon-master.dtb: /pwm-fan: failed to match 
any schema with compatible: ['pwm-fan']

Can you please point me, what is wrong or did you refer just to the 
deprecated "label" property which doesn't throw a warning in my case?

Did i missed a parameter?

Best regards
Stefan Wahren March 7, 2023, 5:27 p.m. UTC | #7
Hi Krzysztof,

Am 07.03.23 um 09:23 schrieb Krzysztof Kozlowski:
> On 06/03/2023 18:22, Stefan Wahren wrote:
>> From: Stefan Wahren <stefan.wahren@chargebyte.com>
>>
>> The ST IIS328DQ is an accelerometer sensor compatible with
>> the existing ST sensor binding.
> If it is compatible with existing binding, then make it compatible.
> Although your driver change suggests it is not compatible...
since the policy is to make the compatible so specific as possible, i 
will fix the wording here.
>
> Best regards,
> Krzysztof
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Krzysztof Kozlowski March 8, 2023, 8:44 a.m. UTC | #8
On 07/03/2023 18:25, Stefan Wahren wrote:
> Hi Krzysztof,
> 

>      From schema: 
> /home/stefanw/mainline/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml
> arch/arm/boot/dts/imx6ull-tarragon-master.dtb: 
> /soc/bus@2200000/iomuxc-snvs@2290000: failed to match any schema with 
> compatible: ['fsl,imx6ull-iomuxc-snvs']
> arch/arm/boot/dts/imx6ull-tarragon-master.dtb: /pwm-fan: failed to match 
> any schema with compatible: ['pwm-fan']
> 
> Can you please point me, what is wrong or did you refer just to the 
> deprecated "label" property which doesn't throw a warning in my case?
> 
> Did i missed a parameter?

No, you are right, this will pass the tests. I was pretty sure the regex
for leds will fail here but it turns out it is very flexible and led can
appear anywhere. Anyway the doc states that first form is preferred,
(because it is preferred for all other cases) so: led-1, led-2, led-3



Best regards,
Krzysztof
Stefan Wahren March 10, 2023, 10:08 a.m. UTC | #9
Hi Krzysztof,

Am 07.03.23 um 09:24 schrieb Krzysztof Kozlowski:
> On 06/03/2023 18:22, Stefan Wahren wrote:
>> From: Stefan Wahren <stefan.wahren@chargebyte.com>
>>
>> This adds the compatibles for the chargebyte Tarragon boards.
>>
>> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> ---
>>   Documentation/devicetree/bindings/arm/fsl.yaml | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
>> index dece3e9ba7fd..2b430e20a7a6 100644
>> --- a/Documentation/devicetree/bindings/arm/fsl.yaml
>> +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
>> @@ -781,6 +781,15 @@ properties:
>>             - const: tq,imx6ull-tqma6ull2l      # MCIMX6Y2, LGA SoM variant
>>             - const: fsl,imx6ull
>>   
>> +      - description: chargebyte Tarragon Boards
>> +        items:
>> +          - enum:
>> +              - chargebyte,imx6ull-tarragon-master
>> +              - chargebyte,imx6ull-tarragon-micro
>> +              - chargebyte,imx6ull-tarragon-slave
>> +              - chargebyte,imx6ull-tarragon-slavext
>> +          - const: fsl,imx6ull
> I don't think you put it in correct place. Didn't you just stuff it at
> the end?

Yes, i just put it at the end. But to be honest, i'm not sure about the 
order:

armadeus,imx6ull-opos6uldev
..
dh,imx6ull-dhcom-drc02
..
phytec,imx6ull-pbacd10-emmc
..
toradex,colibri-imx6ull-aster
..
kontron,bl-imx6ull
..
tq,imx6ull-tqma6ull2-mba6ulx

Does the order depend on the compatibles and vendor is relevant?

So your expectation was between armadeus and dh?

>
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski March 10, 2023, 10:46 a.m. UTC | #10
On 10/03/2023 11:08, Stefan Wahren wrote:
> Hi Krzysztof,
> 
> Am 07.03.23 um 09:24 schrieb Krzysztof Kozlowski:
>> On 06/03/2023 18:22, Stefan Wahren wrote:
>>> From: Stefan Wahren <stefan.wahren@chargebyte.com>
>>>
>>> This adds the compatibles for the chargebyte Tarragon boards.
>>>
>>> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>
>>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>>> ---
>>>   Documentation/devicetree/bindings/arm/fsl.yaml | 9 +++++++++
>>>   1 file changed, 9 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
>>> index dece3e9ba7fd..2b430e20a7a6 100644
>>> --- a/Documentation/devicetree/bindings/arm/fsl.yaml
>>> +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
>>> @@ -781,6 +781,15 @@ properties:
>>>             - const: tq,imx6ull-tqma6ull2l      # MCIMX6Y2, LGA SoM variant
>>>             - const: fsl,imx6ull
>>>   
>>> +      - description: chargebyte Tarragon Boards
>>> +        items:
>>> +          - enum:
>>> +              - chargebyte,imx6ull-tarragon-master
>>> +              - chargebyte,imx6ull-tarragon-micro
>>> +              - chargebyte,imx6ull-tarragon-slave
>>> +              - chargebyte,imx6ull-tarragon-slavext
>>> +          - const: fsl,imx6ull
>> I don't think you put it in correct place. Didn't you just stuff it at
>> the end?
> 
> Yes, i just put it at the end. But to be honest, i'm not sure about the 
> order:
> 
> armadeus,imx6ull-opos6uldev
> ..
> dh,imx6ull-dhcom-drc02
> ..
> phytec,imx6ull-pbacd10-emmc
> ..
> toradex,colibri-imx6ull-aster
> ..
> kontron,bl-imx6ull
> ..
> tq,imx6ull-tqma6ull2-mba6ulx
> 
> Does the order depend on the compatibles and vendor is relevant?
> 
> So your expectation was between armadeus and dh?

This I don't know :). I think order was by description (name of board)
but maybe by compatibles.

Best regards,
Krzysztof
Jonathan Cameron March 11, 2023, 6:06 p.m. UTC | #11
On Tue, 7 Mar 2023 18:27:53 +0100
Stefan Wahren <stefan.wahren@i2se.com> wrote:

> Hi Krzysztof,
> 
> Am 07.03.23 um 09:23 schrieb Krzysztof Kozlowski:
> > On 06/03/2023 18:22, Stefan Wahren wrote:  
> >> From: Stefan Wahren <stefan.wahren@chargebyte.com>
> >>
> >> The ST IIS328DQ is an accelerometer sensor compatible with
> >> the existing ST sensor binding.  
> > If it is compatible with existing binding, then make it compatible.
> > Although your driver change suggests it is not compatible...  
> since the policy is to make the compatible so specific as possible, i 
> will fix the wording here.

Driver changes are naming only - which we do want as that isn't discoverable
from the device but it will 'work' fine with a fallback compatible of
st,h3lis331dl-accel be it with wrong device naming exposed to userspace.

Hmm. That shouldn't have the postfix as it's not a multi device package
(which are the cases where we need postfix as they have multiple drivers
binding to different independent things in the one package / part number)

If someone wants to add a compatible of st,h3lis331dl and deprecate
the accel variant that would be fine, but wouldn't help us much here
for a fallback compatible and it's probably not worth the effort.

Historically we've not been doing fallback compatibles right in this
driver but it's probably not worth 'fixing' that for old devices
as the only real benefit would be things working nicely with old kernels.
Nice to not make it worse though.

So I'd like to see this fallback to st,h3lis331dl-accel

Jonathan


> >
> > Best regards,
> > Krzysztof
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Jonathan Cameron March 11, 2023, 6:08 p.m. UTC | #12
On Mon,  6 Mar 2023 18:22:46 +0100
Stefan Wahren <stefan.wahren@i2se.com> wrote:

> From: Stefan Wahren <stefan.wahren@chargebyte.com>
> 
> Add support for ST IIS328DQ accelerometer to the st_accel framework.
> The chip is compatible to the LIS331DL.
> 
> Link: https://www.st.com/resource/en/datasheet/iis328dq.pdf
> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

LGTM. I'll pick up when the binding discussion concludes.
(assuming no other issues raised!)

Jonathan

> ---
>  drivers/iio/accel/st_accel.h      | 1 +
>  drivers/iio/accel/st_accel_core.c | 1 +
>  drivers/iio/accel/st_accel_i2c.c  | 5 +++++
>  drivers/iio/accel/st_accel_spi.c  | 5 +++++
>  4 files changed, 12 insertions(+)
> 
> diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
> index 56ed0c776d4a..e7525615712b 100644
> --- a/drivers/iio/accel/st_accel.h
> +++ b/drivers/iio/accel/st_accel.h
> @@ -39,6 +39,7 @@
>  #define LIS302DL_ACCEL_DEV_NAME		"lis302dl"
>  #define LSM303C_ACCEL_DEV_NAME		"lsm303c_accel"
>  #define SC7A20_ACCEL_DEV_NAME		"sc7a20"
> +#define IIS328DQ_ACCEL_DEV_NAME		"iis328dq"
>  
>  
>  #ifdef CONFIG_IIO_BUFFER
> diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
> index 6b8562f684d5..5f7d81b44b1d 100644
> --- a/drivers/iio/accel/st_accel_core.c
> +++ b/drivers/iio/accel/st_accel_core.c
> @@ -517,6 +517,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
>  		.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
>  		.sensors_supported = {
>  			[0] = H3LIS331DL_ACCEL_DEV_NAME,
> +			[1] = IIS328DQ_ACCEL_DEV_NAME,
>  		},
>  		.ch = (struct iio_chan_spec *)st_accel_12bit_channels,
>  		.odr = {
> diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
> index 3f02fd5d5946..fb9e2d6f4210 100644
> --- a/drivers/iio/accel/st_accel_i2c.c
> +++ b/drivers/iio/accel/st_accel_i2c.c
> @@ -119,6 +119,10 @@ static const struct of_device_id st_accel_of_match[] = {
>  		.compatible = "silan,sc7a20",
>  		.data = SC7A20_ACCEL_DEV_NAME,
>  	},
> +	{
> +		.compatible = "st,iis328dq",
> +		.data = IIS328DQ_ACCEL_DEV_NAME,
> +	},
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, st_accel_of_match);
> @@ -157,6 +161,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
>  	{ LIS302DL_ACCEL_DEV_NAME },
>  	{ LSM303C_ACCEL_DEV_NAME },
>  	{ SC7A20_ACCEL_DEV_NAME },
> +	{ IIS328DQ_ACCEL_DEV_NAME },
>  	{},
>  };
>  MODULE_DEVICE_TABLE(i2c, st_accel_id_table);
> diff --git a/drivers/iio/accel/st_accel_spi.c b/drivers/iio/accel/st_accel_spi.c
> index 5740dc1820bd..f72a24f45322 100644
> --- a/drivers/iio/accel/st_accel_spi.c
> +++ b/drivers/iio/accel/st_accel_spi.c
> @@ -100,6 +100,10 @@ static const struct of_device_id st_accel_of_match[] = {
>  		.compatible = "st,lsm303c-accel",
>  		.data = LSM303C_ACCEL_DEV_NAME,
>  	},
> +	{
> +		.compatible = "st,iis328dq",
> +		.data = IIS328DQ_ACCEL_DEV_NAME,
> +	},
>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, st_accel_of_match);
> @@ -157,6 +161,7 @@ static const struct spi_device_id st_accel_id_table[] = {
>  	{ LIS3DE_ACCEL_DEV_NAME },
>  	{ LIS302DL_ACCEL_DEV_NAME },
>  	{ LSM303C_ACCEL_DEV_NAME },
> +	{ IIS328DQ_ACCEL_DEV_NAME },
>  	{},
>  };
>  MODULE_DEVICE_TABLE(spi, st_accel_id_table);