From 2fab942ce1171a7c5dbe08369b435e7fa9a7d56b Mon Sep 17 00:00:00 2001 From: Vincent Tremblay Date: Sun, 1 Jan 2023 14:16:08 -0500 Subject: [PATCH] generic: fix silicon labs spidev bindings Fix Silicon Labs bindings in the spidev driver Some bindings for Silicon Labs chips already exists upstream. These bindings can be found in trivial-devices.yaml. The existing bindings are using "silabs" instead of "siliconlabs" to identify the manufacturer. This commit add two submitted patches for silabs chips and rename the manufacturer in the different DTS for more coherence. Signed-off-by: Vincent Tremblay --- ...ompletely-disable-the-spidev-warning.patch | 2 +- ...ilicon-Labs-EM3581-device-compatible.patch | 21 ++++++++++++ ...ilicon-Labs-SI3210-device-compatible.patch | 22 +++++++++++++ ...0-add-linux-spidev-compatible-si3210.patch | 18 ----------- ...ilicon-Labs-EM3581-device-compatible.patch | 32 +++++++++++++++++++ ...ilicon-Labs-SI3210-device-compatible.patch | 32 +++++++++++++++++++ ...0-add-linux-spidev-compatible-si3210.patch | 18 ----------- .../arm/boot/dts/qcom-ipq4019-gl-b2200.dts | 2 +- .../arm/boot/dts/qcom-ipq4029-gl-s1300.dts | 2 +- .../ramips/dts/rt5350_dlink_dwr-512-b.dts | 2 +- 10 files changed, 111 insertions(+), 40 deletions(-) create mode 100644 target/linux/generic/pending-5.10/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch create mode 100644 target/linux/generic/pending-5.10/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch delete mode 100644 target/linux/generic/pending-5.10/130-add-linux-spidev-compatible-si3210.patch create mode 100644 target/linux/generic/pending-5.15/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch create mode 100644 target/linux/generic/pending-5.15/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch delete mode 100644 target/linux/generic/pending-5.15/130-add-linux-spidev-compatible-si3210.patch diff --git a/target/linux/bcm27xx/patches-5.15/950-0040-spi-spidev-Completely-disable-the-spidev-warning.patch b/target/linux/bcm27xx/patches-5.15/950-0040-spi-spidev-Completely-disable-the-spidev-warning.patch index d9eb7a03569..ff9a6b09a27 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0040-spi-spidev-Completely-disable-the-spidev-warning.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0040-spi-spidev-Completely-disable-the-spidev-warning.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c -@@ -758,7 +758,7 @@ static int spidev_probe(struct spi_devic +@@ -761,7 +761,7 @@ static int spidev_probe(struct spi_devic * compatible string, it is a Linux implementation thing * rather than a description of the hardware. */ diff --git a/target/linux/generic/pending-5.10/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch b/target/linux/generic/pending-5.10/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch new file mode 100644 index 00000000000..cdb165e19df --- /dev/null +++ b/target/linux/generic/pending-5.10/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch @@ -0,0 +1,21 @@ +From f7982c726e02001afc19052fe48f642dfcbc00b2 Mon Sep 17 00:00:00 2001 +From: Vincent Tremblay +Date: Mon, 26 Dec 2022 21:10:37 -0500 +Subject: [PATCH 1/2] spidev: Add Silicon Labs EM3581 device compatible + +Add compatible string for Silicon Labs EM3581 device. + +Note: This patch is adapted from a patch submitted to the for-next branch (v6.3). + +Signed-off-by: Vincent Tremblay + +--- a/drivers/spi/spidev.c ++++ b/drivers/spi/spidev.c +@@ -682,6 +682,7 @@ static const struct of_device_id spidev_ + { .compatible = "lwn,bk4" }, + { .compatible = "dh,dhcom-board" }, + { .compatible = "menlo,m53cpld" }, ++ { .compatible = "silabs,em3581" }, + {}, + }; + MODULE_DEVICE_TABLE(of, spidev_dt_ids); diff --git a/target/linux/generic/pending-5.10/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch b/target/linux/generic/pending-5.10/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch new file mode 100644 index 00000000000..069e29255d2 --- /dev/null +++ b/target/linux/generic/pending-5.10/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch @@ -0,0 +1,22 @@ +From 536581825219e97fa2ae0c4de35605d2f6311416 Mon Sep 17 00:00:00 2001 +From: Vincent Tremblay +Date: Tue, 27 Dec 2022 09:00:58 -0500 +Subject: [PATCH 2/2] spidev: Add Silicon Labs SI3210 device compatible + +Add compatible string for Silicon Labs SI3210 device. + +Note: This patch is adapted from a patch submitted to the for-next branch (v6.3). + +Signed-off-by: Vincent Tremblay +--- + +--- a/drivers/spi/spidev.c ++++ b/drivers/spi/spidev.c +@@ -683,6 +683,7 @@ static const struct of_device_id spidev_ + { .compatible = "dh,dhcom-board" }, + { .compatible = "menlo,m53cpld" }, + { .compatible = "silabs,em3581" }, ++ { .compatible = "silabs,si3210" }, + {}, + }; + MODULE_DEVICE_TABLE(of, spidev_dt_ids); diff --git a/target/linux/generic/pending-5.10/130-add-linux-spidev-compatible-si3210.patch b/target/linux/generic/pending-5.10/130-add-linux-spidev-compatible-si3210.patch deleted file mode 100644 index 355e900a3b3..00000000000 --- a/target/linux/generic/pending-5.10/130-add-linux-spidev-compatible-si3210.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Giuseppe Lippolis -Subject: Add the linux,spidev compatible in spidev Several device in ramips have this binding in the dts - -Signed-off-by: Giuseppe Lippolis ---- - drivers/spi/spidev.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/spi/spidev.c -+++ b/drivers/spi/spidev.c -@@ -682,6 +682,7 @@ static const struct of_device_id spidev_ - { .compatible = "lwn,bk4" }, - { .compatible = "dh,dhcom-board" }, - { .compatible = "menlo,m53cpld" }, -+ { .compatible = "siliconlabs,si3210" }, - {}, - }; - MODULE_DEVICE_TABLE(of, spidev_dt_ids); diff --git a/target/linux/generic/pending-5.15/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch b/target/linux/generic/pending-5.15/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch new file mode 100644 index 00000000000..f5e0c858b25 --- /dev/null +++ b/target/linux/generic/pending-5.15/110-v6.3-0001-spidev-Add-Silicon-Labs-EM3581-device-compatible.patch @@ -0,0 +1,32 @@ +From f7982c726e02001afc19052fe48f642dfcbc00b2 Mon Sep 17 00:00:00 2001 +From: Vincent Tremblay +Date: Mon, 26 Dec 2022 21:10:37 -0500 +Subject: [PATCH 1/2] spidev: Add Silicon Labs EM3581 device compatible + +Add compatible string for Silicon Labs EM3581 device. + +Note: This patch is adapted from a patch submitted to the for-next branch (v6.3). + +Signed-off-by: Vincent Tremblay +--- + drivers/spi/spidev.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/spi/spidev.c ++++ b/drivers/spi/spidev.c +@@ -693,6 +693,7 @@ static const struct spi_device_id spidev + { .name = "m53cpld" }, + { .name = "spi-petra" }, + { .name = "spi-authenta" }, ++ { .name = "em3581" }, + {}, + }; + MODULE_DEVICE_TABLE(spi, spidev_spi_ids); +@@ -707,6 +708,7 @@ static const struct of_device_id spidev_ + { .compatible = "menlo,m53cpld" }, + { .compatible = "cisco,spi-petra" }, + { .compatible = "micron,spi-authenta" }, ++ { .compatible = "silabs,em3581" }, + {}, + }; + MODULE_DEVICE_TABLE(of, spidev_dt_ids); diff --git a/target/linux/generic/pending-5.15/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch b/target/linux/generic/pending-5.15/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch new file mode 100644 index 00000000000..575c893d508 --- /dev/null +++ b/target/linux/generic/pending-5.15/110-v6.3-0002-spidev-Add-Silicon-Labs-SI3210-device-compatible.patch @@ -0,0 +1,32 @@ +From 536581825219e97fa2ae0c4de35605d2f6311416 Mon Sep 17 00:00:00 2001 +From: Vincent Tremblay +Date: Tue, 27 Dec 2022 09:00:58 -0500 +Subject: [PATCH 2/2] spidev: Add Silicon Labs SI3210 device compatible + +Add compatible string for Silicon Labs SI3210 device. + +Note: This patch is adapted from a patch submitted to the for-next branch (v6.3). + +Signed-off-by: Vincent Tremblay +--- + drivers/spi/spidev.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/spi/spidev.c ++++ b/drivers/spi/spidev.c +@@ -694,6 +694,7 @@ static const struct spi_device_id spidev + { .name = "spi-petra" }, + { .name = "spi-authenta" }, + { .name = "em3581" }, ++ { .name = "si3210" }, + {}, + }; + MODULE_DEVICE_TABLE(spi, spidev_spi_ids); +@@ -709,6 +710,7 @@ static const struct of_device_id spidev_ + { .compatible = "cisco,spi-petra" }, + { .compatible = "micron,spi-authenta" }, + { .compatible = "silabs,em3581" }, ++ { .compatible = "silabs,si3210" }, + {}, + }; + MODULE_DEVICE_TABLE(of, spidev_dt_ids); diff --git a/target/linux/generic/pending-5.15/130-add-linux-spidev-compatible-si3210.patch b/target/linux/generic/pending-5.15/130-add-linux-spidev-compatible-si3210.patch deleted file mode 100644 index 69949a69ac4..00000000000 --- a/target/linux/generic/pending-5.15/130-add-linux-spidev-compatible-si3210.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Giuseppe Lippolis -Subject: Add the linux,spidev compatible in spidev Several device in ramips have this binding in the dts - -Signed-off-by: Giuseppe Lippolis ---- - drivers/spi/spidev.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/spi/spidev.c -+++ b/drivers/spi/spidev.c -@@ -707,6 +707,7 @@ static const struct of_device_id spidev_ - { .compatible = "menlo,m53cpld" }, - { .compatible = "cisco,spi-petra" }, - { .compatible = "micron,spi-authenta" }, -+ { .compatible = "siliconlabs,si3210" }, - {}, - }; - MODULE_DEVICE_TABLE(of, spidev_dt_ids); diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts index e17609ff6fb..96ab73962e9 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts @@ -211,7 +211,7 @@ status = "okay"; spidev1: spi@0 { - compatible = "siliconlabs,si3210"; + compatible = "silabs,si3210"; reg = <0>; spi-max-frequency = <24000000>; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts index 8ae8658a7ed..0e7f4c970f4 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts @@ -221,7 +221,7 @@ status = "okay"; spidev1: spi@0 { - compatible = "siliconlabs,si3210"; + compatible = "silabs,si3210"; reg = <0>; spi-max-frequency = <24000000>; }; diff --git a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts index a7fc4765b76..7bb1d81abf9 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts @@ -116,7 +116,7 @@ spidev@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "siliconlabs,si3210"; + compatible = "silabs,si3210"; reg = <0>; spi-max-frequency = <1000000>; -- 2.30.2