* [PATCH v2 0/4] Fixes for omapdrm on OpenPandora and GTA04
From: H. Nikolaus Schaller @ 2017-11-16 8:50 UTC (permalink / raw)
To: Thierry Reding, David Airlie, Rob Herring, Mark Rutland,
Benoît Cousson, Tony Lindgren, Russell King, Tomi Valkeinen,
Bartlomiej Zolnierkiewicz, Laurent Pinchart, H. Nikolaus Schaller,
Julia Lawall, Sean Paul
Cc: devicetree, linux-fbdev, letux-kernel, linux-kernel, dri-devel,
kernel, linux-omap, linux-arm-kernel
V2:
* replaced patch to fix DSI VDDS for OMAP3 by equivalent patch from Laurent Pinchart
* keep previous compatibility option in panel driver to handle older device tree binaries
2017-11-08 22:09:36:
This patch set fixes vendor names of the panels
and fixes a problem on omapdrm with enabling
VDD_DSI for OMAP3 which is needed for displaying
the Red and Green channel on OMAP3530 (Pandora).
H. Nikolaus Schaller (3):
omapdrm: fix compatible string for td028ttec1
DTS: GTA04: fix panel compatibility string
DTS: Pandora: fix panel compatibility string
Laurent Pinchart (1):
drm: omapdrm: Fix DPI on platforms using the DSI VDDS
.../display/panel/{toppoly,td028ttec1.txt => tpo,td028ttec1.txt} | 4 ++--
arch/arm/boot/dts/omap3-gta04.dtsi | 2 +-
arch/arm/boot/dts/omap3-pandora-common.dtsi | 2 +-
drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 4 ++--
drivers/gpu/drm/omapdrm/dss/dpi.c | 4 ++--
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c | 4 +++-
6 files changed, 11 insertions(+), 9 deletions(-)
rename Documentation/devicetree/bindings/display/panel/{toppoly,td028ttec1.txt => tpo,td028ttec1.txt} (84%)
--
2.12.2
^ permalink raw reply
* [PATCH v2 1/4] omapdrm: fix compatible string for td028ttec1
From: H. Nikolaus Schaller @ 2017-11-16 8:50 UTC (permalink / raw)
To: Thierry Reding, David Airlie, Rob Herring, Mark Rutland,
Benoît Cousson, Tony Lindgren, Russell King, Tomi Valkeinen,
Bartlomiej Zolnierkiewicz, Laurent Pinchart, H. Nikolaus Schaller,
Julia Lawall, Sean Paul
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
letux-kernel-S0jZdbWzriLCfDggNXIi3w,
kernel-Jl6IXVxNIMRxAtABVqVhTwC/G2K4zDHf
In-Reply-To: <cover.1510822218.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
The vendor name was "toppoly" but other panels and the vendor list
have defined it as "tpo". So let's fix it in driver and bindings.
Signed-off-by: H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
---
.../display/panel/{toppoly,td028ttec1.txt => tpo,td028ttec1.txt} | 4 ++--
drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 4 ++--
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c | 4 +++-
3 files changed, 7 insertions(+), 5 deletions(-)
rename Documentation/devicetree/bindings/display/panel/{toppoly,td028ttec1.txt => tpo,td028ttec1.txt} (84%)
diff --git a/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt b/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt
similarity index 84%
rename from Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt
rename to Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt
index 7175dc3740ac..ed34253d9fb1 100644
--- a/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt
+++ b/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt
@@ -2,7 +2,7 @@ Toppoly TD028TTEC1 Panel
========================
Required properties:
-- compatible: "toppoly,td028ttec1"
+- compatible: "tpo,td028ttec1"
Optional properties:
- label: a symbolic name for the panel
@@ -14,7 +14,7 @@ Example
-------
lcd-panel: td028ttec1@0 {
- compatible = "toppoly,td028ttec1";
+ compatible = "tpo,td028ttec1";
reg = <0>;
spi-max-frequency = <100000>;
spi-cpol;
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
index 0a38a0e8c925..2dab491478c2 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
@@ -452,7 +452,7 @@ static int td028ttec1_panel_remove(struct spi_device *spi)
}
static const struct of_device_id td028ttec1_of_match[] = {
- { .compatible = "omapdss,toppoly,td028ttec1", },
+ { .compatible = "omapdss,tpo,td028ttec1", },
{},
};
@@ -471,7 +471,7 @@ static struct spi_driver td028ttec1_spi_driver = {
module_spi_driver(td028ttec1_spi_driver);
-MODULE_ALIAS("spi:toppoly,td028ttec1");
+MODULE_ALIAS("spi:tpo,td028ttec1");
MODULE_AUTHOR("H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>");
MODULE_DESCRIPTION("Toppoly TD028TTEC1 panel driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
index 57e9e146ff74..b67b324e9919 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
@@ -455,6 +455,8 @@ static int td028ttec1_panel_remove(struct spi_device *spi)
}
static const struct of_device_id td028ttec1_of_match[] = {
+ { .compatible = "omapdss,tpo,td028ttec1", },
+ /* keep to not break older DTB */
{ .compatible = "omapdss,toppoly,td028ttec1", },
{},
};
@@ -474,7 +476,7 @@ static struct spi_driver td028ttec1_spi_driver = {
module_spi_driver(td028ttec1_spi_driver);
-MODULE_ALIAS("spi:toppoly,td028ttec1");
+MODULE_ALIAS("spi:tpo,td028ttec1");
MODULE_AUTHOR("H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>");
MODULE_DESCRIPTION("Toppoly TD028TTEC1 panel driver");
MODULE_LICENSE("GPL");
--
2.12.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v2 2/4] DTS: GTA04: fix panel compatibility string
From: H. Nikolaus Schaller @ 2017-11-16 8:50 UTC (permalink / raw)
To: Thierry Reding, David Airlie, Rob Herring, Mark Rutland,
Benoît Cousson, Tony Lindgren, Russell King, Tomi Valkeinen,
Bartlomiej Zolnierkiewicz, Laurent Pinchart, H. Nikolaus Schaller,
Julia Lawall, Sean Paul
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
letux-kernel-S0jZdbWzriLCfDggNXIi3w,
kernel-Jl6IXVxNIMRxAtABVqVhTwC/G2K4zDHf
In-Reply-To: <cover.1510822218.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
Vendor string is "tpo" and not "toppoly".
Signed-off-by: H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
---
arch/arm/boot/dts/omap3-gta04.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index 4504908c23fe..ec27ed67a22a 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -86,7 +86,7 @@
/* lcd panel */
lcd: td028ttec1@0 {
- compatible = "toppoly,td028ttec1";
+ compatible = "tpo,td028ttec1";
reg = <0>;
spi-max-frequency = <100000>;
spi-cpol;
--
2.12.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v2 3/4] DTS: Pandora: fix panel compatibility string
From: H. Nikolaus Schaller @ 2017-11-16 8:50 UTC (permalink / raw)
To: Thierry Reding, David Airlie, Rob Herring, Mark Rutland,
Benoît Cousson, Tony Lindgren, Russell King, Tomi Valkeinen,
Bartlomiej Zolnierkiewicz, Laurent Pinchart, H. Nikolaus Schaller,
Julia Lawall, Sean Paul
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
letux-kernel-S0jZdbWzriLCfDggNXIi3w,
kernel-Jl6IXVxNIMRxAtABVqVhTwC/G2K4zDHf
In-Reply-To: <cover.1510822218.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
We can remove the "omapdss," prefix because the
omapdrm driver takes care of it.
Signed-off-by: H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
---
arch/arm/boot/dts/omap3-pandora-common.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/omap3-pandora-common.dtsi b/arch/arm/boot/dts/omap3-pandora-common.dtsi
index 53e007abdc71..64d967ec8c58 100644
--- a/arch/arm/boot/dts/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/omap3-pandora-common.dtsi
@@ -626,7 +626,7 @@
lcd: lcd@1 {
reg = <1>; /* CS1 */
- compatible = "omapdss,tpo,td043mtea1";
+ compatible = "tpo,td043mtea1";
spi-max-frequency = <100000>;
spi-cpol;
spi-cpha;
--
2.12.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v2 4/4] drm: omapdrm: Fix DPI on platforms using the DSI VDDS
From: H. Nikolaus Schaller @ 2017-11-16 8:50 UTC (permalink / raw)
To: Thierry Reding, David Airlie, Rob Herring, Mark Rutland,
Benoît Cousson, Tony Lindgren, Russell King, Tomi Valkeinen,
Bartlomiej Zolnierkiewicz, Laurent Pinchart, H. Nikolaus Schaller,
Julia Lawall, Sean Paul
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
letux-kernel-S0jZdbWzriLCfDggNXIi3w,
kernel-Jl6IXVxNIMRxAtABVqVhTwC/G2K4zDHf
In-Reply-To: <cover.1510822218.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
Commit d178e034d565 ("drm: omapdrm: Move FEAT_DPI_USES_VDDS_DSI feature
to dpi code") replaced usage of platform data version with SoC matching
to configure DPI VDDS. The SoC match entries were incorrect, they should
have matched on the machine name instead of the SoC family. Fix it.
The result was observed on OpenPandora with OMAP3530 where the panel only
had the Blue channel and Red&Green were missing. It was not observed on
GTA04 with DM3730.
Fixes: d178e034d565 ("drm: omapdrm: Move FEAT_DPI_USES_VDDS_DSI feature to dpi code")
Signed-off-by: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
Reported-by: H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
Tested-by: H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
---
drivers/gpu/drm/omapdrm/dss/dpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c
index 4ed5fde11313..a91e5f1a0490 100644
--- a/drivers/gpu/drm/omapdrm/dss/dpi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dpi.c
@@ -566,8 +566,8 @@ static int dpi_verify_pll(struct dss_pll *pll)
}
static const struct soc_device_attribute dpi_soc_devices[] = {
- { .family = "OMAP3[456]*" },
- { .family = "[AD]M37*" },
+ { .machine = "OMAP3[456]*" },
+ { .machine = "[AD]M37*" },
{ /* sentinel */ }
};
--
2.12.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v5 0/2] meson: saradc: drop the sana clock
From: Yixun Lan @ 2017-11-16 9:01 UTC (permalink / raw)
To: Kevin Hilman, devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Neil Armstrong, Jerome Brunet, Rob Herring, Mark Rutland,
Martin Blumenstingl, Carlo Caione, Yixun Lan, Xingyu Chen,
linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
This is a rework for the patch [v4 4/4] of previous series,
which mean this will make the patch [1] obsolete.
Changes since v4:
* separate DTS for ARM(32bit) vs ARM64
* add ACK from Martin
[1] [PATCH v4 4/4] ARM64: dts: meson: drop "sana" clock from SAR ADC
http://lists.infradead.org/pipermail/linux-amlogic/2017-November/005266.html
Xingyu Chen (2):
ARM64: dts: meson: drop "sana" clock from SAR ADC
ARM: dts: meson: drop "sana" clock from SAR ADC
arch/arm/boot/dts/meson8.dtsi | 5 ++---
arch/arm/boot/dts/meson8b.dtsi | 5 ++---
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 3 +--
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 3 +--
4 files changed, 6 insertions(+), 10 deletions(-)
--
2.14.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v5 1/2] ARM64: dts: meson: drop "sana" clock from SAR ADC
From: Yixun Lan @ 2017-11-16 9:01 UTC (permalink / raw)
To: Kevin Hilman, devicetree
Cc: Neil Armstrong, Jerome Brunet, Rob Herring, Mark Rutland,
Martin Blumenstingl, Carlo Caione, Yixun Lan, Xingyu Chen,
linux-amlogic, linux-arm-kernel, linux-kernel
In-Reply-To: <20171116090115.29915-1-yixun.lan@amlogic.com>
From: Xingyu Chen <xingyu.chen@amlogic.com>
The SAR ADC modules doesn't require The "sana" clock.
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Singed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
---
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 3 +--
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index af834cdbba79..b77f2593cdc3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -686,10 +686,9 @@
compatible = "amlogic,meson-gxbb-saradc", "amlogic,meson-saradc";
clocks = <&xtal>,
<&clkc CLKID_SAR_ADC>,
- <&clkc CLKID_SANA>,
<&clkc CLKID_SAR_ADC_CLK>,
<&clkc CLKID_SAR_ADC_SEL>;
- clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel";
+ clock-names = "clkin", "core", "adc_clk", "adc_sel";
};
&sd_emmc_a {
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index d8dd3298b15c..07805a3b4db0 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -628,10 +628,9 @@
compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
clocks = <&xtal>,
<&clkc CLKID_SAR_ADC>,
- <&clkc CLKID_SANA>,
<&clkc CLKID_SAR_ADC_CLK>,
<&clkc CLKID_SAR_ADC_SEL>;
- clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel";
+ clock-names = "clkin", "core", "adc_clk", "adc_sel";
};
&sd_emmc_a {
--
2.14.1
^ permalink raw reply related
* [PATCH v5 2/2] ARM: dts: meson: drop "sana" clock from SAR ADC
From: Yixun Lan @ 2017-11-16 9:01 UTC (permalink / raw)
To: Kevin Hilman, devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Neil Armstrong, Jerome Brunet, Rob Herring, Mark Rutland,
Martin Blumenstingl, Carlo Caione, Yixun Lan, Xingyu Chen,
linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20171116090115.29915-1-yixun.lan-LpR1jeaWuhtBDgjK7y7TUQ@public.gmane.org>
From: Xingyu Chen <xingyu.chen-LpR1jeaWuhtBDgjK7y7TUQ@public.gmane.org>
The SAR ADC modules doesn't require The "sana" clock.
Acked-by: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Signed-off-by: Xingyu Chen <xingyu.chen-LpR1jeaWuhtBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Yixun Lan <yixun.lan-LpR1jeaWuhtBDgjK7y7TUQ@public.gmane.org>
---
arch/arm/boot/dts/meson8.dtsi | 5 ++---
arch/arm/boot/dts/meson8b.dtsi | 5 ++---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index b98d44fde6b6..f93d6cf6e094 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -289,9 +289,8 @@
&saradc {
compatible = "amlogic,meson8-saradc", "amlogic,meson-saradc";
clocks = <&clkc CLKID_XTAL>,
- <&clkc CLKID_SAR_ADC>,
- <&clkc CLKID_SANA>;
- clock-names = "clkin", "core", "sana";
+ <&clkc CLKID_SAR_ADC>;
+ clock-names = "clkin", "core";
};
&spifc {
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index bc278da7df0d..4aa444284f0c 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -185,9 +185,8 @@
&saradc {
compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc";
clocks = <&clkc CLKID_XTAL>,
- <&clkc CLKID_SAR_ADC>,
- <&clkc CLKID_SANA>;
- clock-names = "clkin", "core", "sana";
+ <&clkc CLKID_SAR_ADC>;
+ clock-names = "clkin", "core";
};
&uart_AO {
--
2.14.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH] Documentation: dt: rtc-imxdi: imx53-rtc is not compatible
From: linux-kernel-dev-QonKdJ6Bx35Wk0Htik3J/w @ 2017-11-16 9:34 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni
Cc: Patrick Bruenn, Rob Herring, Mark Rutland,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, Fabio Estevam, Juergen Borleis, Noel Vellemans,
Shawn Guo
From: Patrick Bruenn <p.bruenn-QonKdJ6Bx35Wk0Htik3J/w@public.gmane.org>
rtc-imxdi driver is not compatible with imx53-rtc like the example
suggested.
Only the raw timestamp register offsets match by accident, which has the
effect, that during startup/shutdown system clock syncronization with
rtc seems to work for imx53, too.
However hwclock and rtctest, will not work as expected on imx53.
To avoid future reverts like [1], we should adjust the documentation.
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-November/542312.html
Signed-off-by: Patrick Bruenn <p.bruenn-QonKdJ6Bx35Wk0Htik3J/w@public.gmane.org>
---
To: Alessandro Zummo <a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>
To: Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Cc: linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org (open list)
Cc: Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>
Cc: Juergen Borleis <jbe-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Noel Vellemans <Noel.Vellemans-8UENEgx6w+makBO8gow8eQ@public.gmane.org>
Cc: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
index 323cf26374cb..af853b0ceac5 100644
--- a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
+++ b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
@@ -1,6 +1,6 @@
* i.MX25 Real Time Clock controller
-This binding supports the following chips: i.MX25, i.MX53
+This binding supports the following chips: i.MX25
Required properties:
- compatible: should be: "fsl,imx25-rtc"
@@ -14,7 +14,7 @@ Optional properties:
Example:
rtc@80056000 {
- compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+ compatible = "fsl,imx25-rtc";
reg = <0x80056000 2000>;
interrupts = <29 56>;
};
--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* Re: [PATCH v7 10/13] dt-bindings: Add qcom slimbus controller bindings
From: Srinivas Kandagatla @ 2017-11-16 9:42 UTC (permalink / raw)
To: Rob Herring
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
broonie-DgEjT+Ai2ygdnm+yROfE0A, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
sdharia-sgV2jX0FEOL9JmXXK+q4OQ, bp-l3A5Bk7waGM,
poeschel-Xtl8qvBWbHwb1SvskN2V4Q, treding-DDmLM1+adcrQT0dZR+AlfA,
andreas.noever-Re5JQEeQqe8AvxtiuMwx3w,
alan-VuQAYsv1563Yd54FQh9/CA,
mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A, daniel-/w4YWyX8dFk,
jkosina-AlSwsSmVLrQ, sharon.dvir1-MQgwKvJRKlGYZoqfULhbRA,
joe-6d6DIl74uiNBDgjK7y7TUQ, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
james.hogan-1AXoQHu6uovQT0dZR+AlfA,
michael.opdenacker-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
vinod.koul-ral2JQCrhuEAvxtiuMwx3w, arnd-r2nGTMty4D4
In-Reply-To: <20171116051911.tvl6mioxpbo4h72c@rob-hp-laptop>
Thanks for the review,
On 16/11/17 05:19, Rob Herring wrote:
>> + entry should be used.
>> + - reg-name for slew rate: "slew"
> reg-names
>
> I'd prefer it be explicit as to which compatibles do or don't have this
> register.
Makes sense, I will take this in before sending next version.
>
>> +
>> +Example:
>> +
>> + slim@28080000 {
>> + compatible = "qcom,apq8064-slim", "qcom,slim";
>> + reg = <0x28080000 0x2000>,
> error ^
>
thanks for spotting.. will fix this.
>> + interrupts = <0 33 0>;
>> + clocks = <&lcc SLIMBUS_SRC>, <&lcc AUDIO_SLIMBUS_CLK>;
>> + clock-names = "iface", "core";
>> + #address-cells = <2>;
>> + #size-cell = <0>;
>> +
>> + codec: wcd9310@1,0{
> Use generic node names:
>
> wcd9310: audio-codec@1,0
Yep, will do that.
thanks,
srini
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] Documentation: dt: rtc-imxdi: imx53-rtc is not compatible
From: Alexandre Belloni @ 2017-11-16 9:44 UTC (permalink / raw)
To: linux-kernel-dev-QonKdJ6Bx35Wk0Htik3J/w
Cc: Alessandro Zummo, Patrick Bruenn, Rob Herring, Mark Rutland,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, Fabio Estevam, Juergen Borleis, Noel Vellemans,
Shawn Guo
In-Reply-To: <20171116093425.32145-1-linux-kernel-dev-QonKdJ6Bx35Wk0Htik3J/w@public.gmane.org>
Hi,
The following patch was already sent by Fabio:
http://patchwork.ozlabs.org/patch/838173/
On 16/11/2017 at 10:34:25 +0100, linux-kernel-dev-QonKdJ6Bx35Wk0Htik3J/w@public.gmane.org wrote:
> From: Patrick Bruenn <p.bruenn-QonKdJ6Bx35Wk0Htik3J/w@public.gmane.org>
>
> rtc-imxdi driver is not compatible with imx53-rtc like the example
> suggested.
> Only the raw timestamp register offsets match by accident, which has the
> effect, that during startup/shutdown system clock syncronization with
> rtc seems to work for imx53, too.
> However hwclock and rtctest, will not work as expected on imx53.
> To avoid future reverts like [1], we should adjust the documentation.
>
> [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-November/542312.html
>
> Signed-off-by: Patrick Bruenn <p.bruenn-QonKdJ6Bx35Wk0Htik3J/w@public.gmane.org>
>
> ---
>
> To: Alessandro Zummo <a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>
> To: Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
> Cc: linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org (open list)
> Cc: Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>
> Cc: Juergen Borleis <jbe-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Noel Vellemans <Noel.Vellemans-8UENEgx6w+makBO8gow8eQ@public.gmane.org>
> Cc: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
> Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
> index 323cf26374cb..af853b0ceac5 100644
> --- a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
> +++ b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
> @@ -1,6 +1,6 @@
> * i.MX25 Real Time Clock controller
>
> -This binding supports the following chips: i.MX25, i.MX53
> +This binding supports the following chips: i.MX25
>
> Required properties:
> - compatible: should be: "fsl,imx25-rtc"
> @@ -14,7 +14,7 @@ Optional properties:
> Example:
>
> rtc@80056000 {
> - compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
> + compatible = "fsl,imx25-rtc";
> reg = <0x80056000 2000>;
> interrupts = <29 56>;
> };
> --
> 2.11.0
>
>
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 0/2] add support rk3126 vop support
From: Sandy Huang @ 2017-11-16 9:47 UTC (permalink / raw)
To: Mark Yao, David Airlie, Rob Herring, Mark Rutland, Heiko Stuebner
Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
linux-rockchip
In-Reply-To: <1510658851-90160-1-git-send-email-hjc@rock-chips.com>
pushed to drm-misc-next.
在 2017/11/14 19:27, Sandy Huang 写道:
> The following patch add support RK3126 vop support, there is only one
> VOP at RK3126, and the RK3126 VOP register layout is similar with RK3036,
> so some feature can reuse with RK3036.
>
> Sandy Huang (2):
> dt-bindings: add document for rk3126-vop
> drm/rockchip: vop: add rk3126 vop support
>
> .../bindings/display/rockchip/rockchip-vop.txt | 1 +
> drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 30 ++++++++++++++++++++++
> drivers/gpu/drm/rockchip/rockchip_vop_reg.h | 6 +++++
> 3 files changed, 37 insertions(+)
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* Cedrus driver
From: Giulio Benetti @ 2017-11-16 10:13 UTC (permalink / raw)
To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A
Cc: mark.rutland-5wv7dgnIgG8, linux-I+IVW8TIWO2tmTQ+vhA3Yw,
maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, wens-jdAy2FN1RRM,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
In-Reply-To: <1510059543-7064-1-git-send-email-giulio.benetti-W14uJ/fiAyBY2hyreNRi6g@public.gmane.org>
Hello,
I'm wondering why cedrus
https://github.com/FlorentRevest/linux-sunxi-cedrus has never been
merged with linux-sunxi sunxi-next.
I see it seems to be dead, no commit in 1 year.
I would like to respawn it and contribute to sunxi-next,
since we need video acceleration on A20 and A33.
Best regards
--
Giulio Benetti
R&D Manager &
Advanced Research
MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply
* Re: Cedrus driver
From: Giulio Benetti @ 2017-11-16 10:37 UTC (permalink / raw)
To: Andreas Baierl, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
linux-I+IVW8TIWO2tmTQ+vhA3Yw,
maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, wens-jdAy2FN1RRM,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <6fcdc0d9-d0f8-785a-bb00-b1b41c684e59-IaPFKHZio8oZId6A0yLOdQ@public.gmane.org>
Hi,
Il 16/11/2017 11:31, Andreas Baierl ha scritto:
> Am 16.11.2017 um 11:13 schrieb Giulio Benetti:
>> Hello,
>>
> Hello,
>> I'm wondering why cedrus
>> https://github.com/FlorentRevest/linux-sunxi-cedrus has never been
>> merged with linux-sunxi sunxi-next.
>>
> Because it is not ready to be merged. It depends on the v4l2 request
> API, which was not merged and which is re-worked atm.
> Also, sunxi-cedrus itself is not in a finished state and is not as
> feature-complete to be merged. Anyway it might be something for
> staging... Has there been a [RFC] on the mailing list at all?
Where can I find a list of TODOs to get it ready to be merged?
>> I see it seems to be dead, no commit in 1 year.
> Yes, because the author did this during an internship, which ended ...
> Afaik nobody picked up his work yet.
>> I would like to respawn it and contribute to sunxi-next,
> Feel free to work on it...
Hope to be able, but I'm going to try.
>> since we need video acceleration on A20 and A33.
>>
> ack.
By the way, when you answer to google group, is it right that all CC I
inserted are not inserted too?
Because this causes mess with mailing lists (seems to me).
>
> Regards
> rellla
>> Best regards
>>
>
--
Giulio Benetti
R&D Manager &
Advanced Research
MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply
* Re: [PATCH v4 11/12] ASoC: add bindings for stm32 DFSDM filter
From: Arnaud Pouliquen @ 2017-11-16 10:53 UTC (permalink / raw)
To: Rob Herring
Cc: Mark Rutland, devicetree@vger.kernel.org,
alsa-devel@alsa-project.org, Lars-Peter Clausen, Maxime Coquelin,
Liam Girdwood, linux-iio@vger.kernel.org, Takashi Iwai,
Mark Brown, linux-arm-kernel@lists.infradead.org,
Peter Meerwald-Stadler, Hartmut Knaack, Jonathan Cameron,
Alexandre TORGUE
In-Reply-To: <20171115154304.dzrezz7trvoway73@rob-hp-laptop>
Hello Rob,
Thanks for the Review,
On 11/15/2017 04:43 PM, Rob Herring wrote:
> On Thu, Nov 09, 2017 at 11:12:33AM +0100, Arnaud Pouliquen wrote:
>> Add bindings that describes audio settings to support
>> Digital Filter for pulse density modulation(PDM) microphone.
>>
>> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
>> ---
>> V3 -> V4 changes:
>> - Update to move on of_graph description.
>> - Link to DFSDM IIO bindings.
>>
>> .../devicetree/bindings/sound/st,stm32-adfsdm.txt | 63 ++++++++++++++++++++++
>> 1 file changed, 63 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt
>>
>> diff --git a/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt b/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt
>> new file mode 100644
>> index 0000000..75e298b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt
>> @@ -0,0 +1,63 @@
>> +STMicroelectronics audio DFSDM DT bindings
>> +
>> +This driver supports audio PDM microphone capture through Digital Filter format
>
> Bindings aren't drivers.
Yes, sorry very bad wording, i will change sentence.
>
>> +Sigma Delta modulators (DFSDM).
>> +
>> +Required properties:
>> + - compatible: "st,stm32h7-dfsdm-dai".
>> +
>> + - #sound-dai-cells : Must be equal to 0
>> +
>> + - io-channels : phandle to iio dfsdm instance node.
>> + [See: ../iio/adc/st,stm32-dfsdm-adc.txt for DFSDM options]
>> +
>> +Example of a sound card using audio DFSDM node.
>> +
>> + sound_card {
>> + compatible = "audio-graph-card";
>> +
>> + dais = <&cpu_port>;
>> + };
>> +
>> + dfsdm: dfsdm@40017000 {
>> + compatible = "st,stm32h7-dfsdm";
>> + reg = <0x40017000 0x400>;
>> + clocks = <&rcc DFSDM1_CK>;
>> + clock-names = "dfsdm";
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + dfsdm_adc0: dfsdm-adc@0 {
>> + compatible = "st,stm32-dfsdm-dmic";
>> + reg = <0>;
>> + interrupts = <110>;
>> + dmas = <&dmamux1 101 0x400 0x00>;
>> + dma-names = "rx";
>> + st,adc-channels = <1>;
>> + st,adc-channel-names = "dmic0";
>> + st,adc-channel-types = "SPI_R";
>> + st,adc-channel-clk-src = "CLKOUT";
>> + st,filter-order = <5>;
>> + };
>> + }
>> +
>> + dfsdm_dai0:dfsdm_dai@0 {
>
> Unit address without reg property is not valid. Building your dtb with
> W=2 will tell you this.
>
> Need a space after the ':'.
>
> Should be a child of dfsdm?
>
>> + compatible = "st,stm32h7-dfsdm-dai";
>> + #sound-dai-cells = <0>;
>> + io-channels = <&dfsdm_adc0 0>;
>
> It doesn't seem like this is an actual h/w block. Why can't 'dais' point
> directly to the ADC?DFSDM is not simple to describe in DT for audio.
Assumption is that audio feature should be part of the ASoc framework.
This means that we expect to use of_graph based on a DT description.
of_graph should point to the DAI device. In this case we need to
describe a DAI Alsa device ( associated compatible driver in ASoC):
dfsdm_dai0.
This DAI device is a client of the IIO device dfsdm_adc0 using in-kernel
iio consumer interface, so points to it using io-channels property.
Now as you propose above, i can describe DAI device as a child of the
DFSDM ADC device like this:
dfsdm: dfsdm@40017000 {
compatible = "st,stm32h7-dfsdm";
reg = <0x40017000 0x400>;
clocks = <&rcc DFSDM1_CK>;
clock-names = "dfsdm";
#address-cells = <1>;
#size-cells = <0>;
dfsdm_adc0: dfsdm-adc@0 {
compatible = "st,stm32-dfsdm-dmic";
reg = <0>;
interrupts = <110>;
dmas = <&dmamux1 101 0x400 0x00>;
dma-names = "rx";
st,adc-channels = <1>;
st,adc-channel-names = "dmic0";
st,adc-channel-types = "SPI_R";
st,adc-channel-clk-src = "CLKOUT";
st,filter-order = <5>;
dfsdm_dai0: dfsdm-dai {
compatible = "st,stm32h7-dfsdm-dai";
#sound-dai-cells = <0>;
io-channels = <&dfsdm_adc0 0>;
cpu_port: port {
dfsdm_endpoint: endpoint {
remote-endpoint = <&dmic0_endpoint>;
};
};
};
};
Is is something that would sound better for you?
Regards,
Arnaud
>
>> + cpu_port: port {
>> + dfsdm_endpoint: endpoint {
>> + remote-endpoint = <&dmic0_endpoint>;
>> + };
>> + };
>> + };
>> +
>> + dmic0: dmic@0 {
>> + compatible = "dmic-codec";
>> + #sound-dai-cells = <0>;
>> + port {
>> + dmic0_endpoint: endpoint {
>> + remote-endpoint = <&dfsdm_endpoint>;
>> + };
>> + };
>> + };
>> --
>> 2.7.4
>>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply
* Re: [linux-sunxi] Cedrus driver
From: Maxime Ripard @ 2017-11-16 11:02 UTC (permalink / raw)
To: Giulio Benetti
Cc: Andreas Baierl, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
linux-I+IVW8TIWO2tmTQ+vhA3Yw, wens-jdAy2FN1RRM,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
thomas-XCRq7eEM0/pmR6Xm/wNWPw, linux-media-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <693e8786-af83-9d77-0fd4-50fa1f6a135f-W14uJ/fiAyBY2hyreNRi6g@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2125 bytes --]
Hi,
I'm not sure why there's so many recipients (Russell, Rob or Mark have
a limited interest in this I assume), and why you're also missing some
key ones (like the v4l2 list).
On Thu, Nov 16, 2017 at 11:37:30AM +0100, Giulio Benetti wrote:
> Il 16/11/2017 11:31, Andreas Baierl ha scritto:
> > Am 16.11.2017 um 11:13 schrieb Giulio Benetti:
> > > Hello,
> > >
> > Hello,
> > > I'm wondering why cedrus
> > > https://github.com/FlorentRevest/linux-sunxi-cedrus has never been
> > > merged with linux-sunxi sunxi-next.
> > >
> > Because it is not ready to be merged. It depends on the v4l2 request
> > API, which was not merged and which is re-worked atm.
> > Also, sunxi-cedrus itself is not in a finished state and is not as
> > feature-complete to be merged. Anyway it might be something for
> > staging... Has there been a [RFC] on the mailing list at all?
>
> Where can I find a list of TODOs to get it ready to be merged?
Assuming that the request API is in, we'd need to:
- Finish the MPEG4 support
- Work on more useful codecs (H264 comes to my mind)
- Implement the DRM planes support for the custom frame format
- Implement the DRM planes support for scaling
- Test it on more SoCs
Or something along those lines.
> > > I see it seems to be dead, no commit in 1 year.
> >
> > Yes, because the author did this during an internship, which ended ...
> > Afaik nobody picked up his work yet.
That's not entirely true. Some work has been done by Thomas (in CC),
especially on the display engine side, but last time we talked his
work was not really upstreamable.
We will also resume that effort starting next march.
> > > since we need video acceleration on A20 and A33.
> > >
> > ack.
>
> By the way, when you answer to google group, is it right that all CC I
> inserted are not inserted too?
> Because this causes mess with mailing lists (seems to me).
Yes, that's one of the many brain-damaged thing happening on that
list...
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH 2/6] arm: dts: imx: Add missing #phy-cells to usb-nop-xceiv
From: Shawn Guo @ 2017-11-16 11:10 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
arm-DgEjT+Ai2ygdnm+yROfE0A, Sascha Hauer, Fabio Estevam
In-Reply-To: <20171109222614.5719-2-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
On Thu, Nov 09, 2017 at 04:26:10PM -0600, Rob Herring wrote:
> "usb-nop-xceiv" is using the phy binding, but is missing #phy-cells
> property. This is probably because the binding was the precursor to the phy
> binding.
>
> Fixes the following warning in i.MX dts files:
>
> Warning (phys_property): Missing property '#phy-cells' in node ...
>
> Signed-off-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] arm: dts: ls1021a: add "fsl, ls1021a-esdhc" compatible string to esdhc node
From: Fabio Estevam @ 2017-11-16 11:53 UTC (permalink / raw)
To: Rasmus Villemoes
Cc: Rob Herring, Mark Rutland, Russell King,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Shawn Guo
In-Reply-To: <1510583976-6661-1-git-send-email-rasmus.villemoes-rjjw5hvvQKZaa/9Udqfwiw@public.gmane.org>
Rasmus,
On Mon, Nov 13, 2017 at 12:39 PM, Rasmus Villemoes
<rasmus.villemoes-rjjw5hvvQKZaa/9Udqfwiw@public.gmane.org> wrote:
> Commit a22950c888e3 (mmc: sdhci-of-esdhc: add quirk
> SDHCI_QUIRK_BROKEN_TIMEOUT_VAL for ls1021a) added logic to the driver to
> enable the broken timeout val quirk for ls1021a, but did not add the
> corresponding compatible string to the device tree, so it didn't really
> have any effect. Fix that.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes-rjjw5hvvQKZaa/9Udqfwiw@public.gmane.org>
Please resend it with Shawn Guo on Cc. Thanks
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 0/2] Add VIN support to r8a7743
From: Fabrizio Castro @ 2017-11-16 12:11 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Mark Rutland, Rob Herring, Russell King
Cc: Fabrizio Castro, Niklas Söderlund,
linux-media-u79uwXL29TY76Z2rM5mHXA,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Simon Horman,
Magnus Damm, Geert Uytterhoeven, Chris Paterson, Biju Das
Hello,
this series documents VIN related dt-bindings for r8a774[35], and adds VIN[012]
nodes to the r8a7743 SoC dtsi.
Best regards,
Fabrizio Castro (2):
dt-bindings: media: rcar_vin: add device tree support for r8a774[35]
ARM: dts: r8a7743: add VIN dt support
.../devicetree/bindings/media/rcar_vin.txt | 5 ++-
arch/arm/boot/dts/r8a7743.dtsi | 36 ++++++++++++++++++++++
2 files changed, 40 insertions(+), 1 deletion(-)
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 1/2] dt-bindings: media: rcar_vin: add device tree support for r8a774[35]
From: Fabrizio Castro @ 2017-11-16 12:11 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Mark Rutland, Rob Herring
Cc: Fabrizio Castro, Niklas Söderlund,
linux-media-u79uwXL29TY76Z2rM5mHXA,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, Simon Horman,
Geert Uytterhoeven, Chris Paterson, Biju Das
In-Reply-To: <1510834290-25434-1-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Add compatible strings for r8a7743 and r8a7745. No driver change
change is needed as "renesas,rcar-gen2-vin" will activate the right
code. However, it is good practice to document compatible strings
for the specific SoC as this allows SoC specific changes to the
driver if needed, in addition to document SoC support and therefore
allow checkpatch.pl to validate compatible string values.
Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Reviewed-by: Biju Das <biju.das-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
Documentation/devicetree/bindings/media/rcar_vin.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt
index 6e4ef8c..0042ef2 100644
--- a/Documentation/devicetree/bindings/media/rcar_vin.txt
+++ b/Documentation/devicetree/bindings/media/rcar_vin.txt
@@ -14,7 +14,10 @@ channel which can be either RGB, YUYV or BT656.
- "renesas,vin-r8a7790" for the R8A7790 device
- "renesas,vin-r8a7779" for the R8A7779 device
- "renesas,vin-r8a7778" for the R8A7778 device
- - "renesas,rcar-gen2-vin" for a generic R-Car Gen2 compatible device.
+ - "renesas,vin-r8a7745" for the R8A7745 device
+ - "renesas,vin-r8a7743" for the R8A7743 device
+ - "renesas,rcar-gen2-vin" for a generic R-Car Gen2 or RZ/G1 compatible
+ device.
- "renesas,rcar-gen3-vin" for a generic R-Car Gen3 compatible device.
When compatible with the generic version nodes must list the
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH 2/2] ARM: dts: r8a7743: add VIN dt support
From: Fabrizio Castro @ 2017-11-16 12:11 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Russell King
Cc: Fabrizio Castro, Simon Horman, Magnus Damm,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Geert Uytterhoeven, Chris Paterson, Biju Das
In-Reply-To: <1510834290-25434-1-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Add VIN[012] support to SoC dt. Also, add aliases.
Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Reviewed-by: Biju Das <biju.das-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
arch/arm/boot/dts/r8a7743.dtsi | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index 9e26c40..c09c667 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -32,6 +32,9 @@
spi1 = &msiof0;
spi2 = &msiof1;
spi3 = &msiof2;
+ vin0 = &vin0;
+ vin1 = &vin1;
+ vin2 = &vin2;
};
cpus {
@@ -1037,6 +1040,39 @@
};
};
+ vin0: video@e6ef0000 {
+ compatible = "renesas,vin-r8a7743",
+ "renesas,rcar-gen2-vin";
+ reg = <0 0xe6ef0000 0 0x1000>;
+ interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 811>;
+ power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+ resets = <&cpg 811>;
+ status = "disabled";
+ };
+
+ vin1: video@e6ef1000 {
+ compatible = "renesas,vin-r8a7743",
+ "renesas,rcar-gen2-vin";
+ reg = <0 0xe6ef1000 0 0x1000>;
+ interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 810>;
+ power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+ resets = <&cpg 810>;
+ status = "disabled";
+ };
+
+ vin2: video@e6ef2000 {
+ compatible = "renesas,vin-r8a7743",
+ "renesas,rcar-gen2-vin";
+ reg = <0 0xe6ef2000 0 0x1000>;
+ interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 809>;
+ power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+ resets = <&cpg 809>;
+ status = "disabled";
+ };
+
du: display@feb00000 {
compatible = "renesas,du-r8a7743";
reg = <0 0xfeb00000 0 0x40000>,
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* Decompiled vs *tmp extended device tree
From: Alan Martinovic @ 2017-11-16 12:12 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA
Hi,
I'm trying to modify a device tree to enable support of the second UART.
The actual device tree which is used for the example:
https://github.com/getsenic/senic-os-linux/blob/senic/4.13/arch/arm/boot/dts/sun8i-h3-senic-hub.dts
The device tree includes and overrides some additional files:
#include "sun8i-h3.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
I would like to know to what does the extended device tree look like,
and use that as my base, because I don't really have the complete picture
by just looking at the sun8i-h3-senic-hub.dts
In this example I'm interested in where are "uart0_pins_a" defined.
sun8i-h3-senic-hub.dts references them but has no definitions,
so I'm assuming the definition is somewhere in the included files.
To help me out with this task I discovered the device tree decompiler.
Am expecting that the decompiled dts contains all the data that
end up in the dtb blob, and should, among other, contain all the information
available in sun8i-h3-senic-hub.dts.
scripts/dtc/dtc -I dtb -O dts -o expanded-devtree.dts
arch/arm/boot/dts/sun8i-h3-senic-hub.dtb
But the decompiled extended device tree also seems to have no
traces of "uart0_pins_a" at all :
grep uart0_pins_a expanded-devtree.dts
I've also discovered the hidden .tmp files:
⟫ ls arch/arm/boot/dts/.sun8i-h3-*
arch/arm/boot/dts/.sun8i-h3-senic-hub.dtb.cmd
arch/arm/boot/dts/.sun8i-h3-senic-hub.dtb.d.dtc.tmp
arch/arm/boot/dts/.sun8i-h3-senic-hub.dtb.d.pre.tmp
arch/arm/boot/dts/.sun8i-h3-senic-hub.dtb.dts.tmp
and in one of them there is a definition to "uart0_pins_a":
⟫ grep uart0_pins_a arch/arm/boot/dts/.sun8i-h3-*
arch/arm/boot/dts/.sun8i-h3-senic-hub.dtb.dts.tmp: uart0_pins_a: uart0@0 {
arch/arm/boot/dts/.sun8i-h3-senic-hub.dtb.dts.tmp: pinctrl-0 =
<&uart0_pins_a>;
My question is, which one is a more accurate representation
of the final device tree that I should use as a basis?
Why isn't it correct to expect that everything from sun8i-h3-senic-hub.dts
will end up in the final device tree blob?
Be Well,
Alan
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH resend] arm: dts: ls1021a: add "fsl,ls1021a-esdhc" compatible string to esdhc node
From: Rasmus Villemoes @ 2017-11-16 12:15 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Russell King
Cc: Rasmus Villemoes, Shawn Guo, yinbo.zhu, Fabio Estevam,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1510583976-6661-1-git-send-email-rasmus.villemoes-rjjw5hvvQKZaa/9Udqfwiw@public.gmane.org>
Commit a22950c888e3 (mmc: sdhci-of-esdhc: add quirk
SDHCI_QUIRK_BROKEN_TIMEOUT_VAL for ls1021a) added logic to the driver to
enable the broken timeout val quirk for ls1021a, but did not add the
corresponding compatible string to the device tree, so it didn't really
have any effect. Fix that.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes-rjjw5hvvQKZaa/9Udqfwiw@public.gmane.org>
---
Resending with Shawn Guo, Yinbo Zhu and Fabio Estevam on Cc in
addition to those generated by get_maintainer.pl.
arch/arm/boot/dts/ls1021a.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index 3ff2b8a9f01a..9cdec545decc 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -162,7 +162,7 @@
};
esdhc: esdhc@1560000 {
- compatible = "fsl,esdhc";
+ compatible = "fsl,ls1021a-esdhc", "fsl,esdhc";
reg = <0x0 0x1560000 0x0 0x10000>;
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
clock-frequency = <0>;
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH V1 1/4] qcom: spmi-wled: Add support for qcom wled driver
From: Kiran Gunda @ 2017-11-16 12:18 UTC (permalink / raw)
To: bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Lee Jones, Daniel Thompson,
Jingoo Han, Richard Purdie, Jacek Anaszewski, Pavel Machek,
Rob Herring, Mark Rutland, Bartlomiej Zolnierkiewicz,
linux-leds-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA
Cc: linux-arm-msm-owner-u79uwXL29TY76Z2rM5mHXA, Kiran Gunda
In-Reply-To: <1510834717-21765-1-git-send-email-kgunda-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
WLED driver provides the interface to the display driver to
adjust the brightness of the display backlight.
Signed-off-by: Kiran Gunda <kgunda-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
---
.../bindings/leds/backlight/qcom-spmi-wled.txt | 90 ++++
drivers/video/backlight/Kconfig | 9 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/qcom-spmi-wled.c | 504 +++++++++++++++++++++
4 files changed, 604 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/backlight/qcom-spmi-wled.txt
create mode 100644 drivers/video/backlight/qcom-spmi-wled.c
diff --git a/Documentation/devicetree/bindings/leds/backlight/qcom-spmi-wled.txt b/Documentation/devicetree/bindings/leds/backlight/qcom-spmi-wled.txt
new file mode 100644
index 0000000..f1ea25b
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/backlight/qcom-spmi-wled.txt
@@ -0,0 +1,90 @@
+Binding for Qualcomm WLED driver
+
+WLED (White Light Emitting Diode) driver is used for controlling display
+backlight that is part of PMIC on Qualcomm Technologies reference platforms.
+The PMIC is connected to the host processor via SPMI bus.
+
+- compatible
+ Usage: required
+ Value type: <string>
+ Definition: should be "qcom,pm8998-spmi-wled".
+
+- reg
+ Usage: required
+ Value type: <prop-encoded-array>
+ Definition: Base address and size of the WLED modules.
+
+- reg-names
+ Usage: required
+ Value type: <string>
+ Definition: Names associated with base addresses. should be
+ "qcom-wled-ctrl-base", "qcom-wled-sink-base".
+
+- label
+ Usage: required
+ Value type: <string>
+ Definition: The name of the backlight device.
+
+- default-brightness
+ Usage: optional
+ Value type: <u32>
+ Definition: brightness value on boot, value from: 0-4095
+ default: 2048
+
+- qcom,fs-current-limit
+ Usage: optional
+ Value type: <u32>
+ Definition: per-string full scale current limit in uA. value from
+ 0 to 30000 with 5000 uA resolution. default: 25000 uA
+
+- qcom,current-boost-limit
+ Usage: optional
+ Value type: <u32>
+ Definition: ILIM threshold in mA. values are 105, 280, 450, 620, 970,
+ 1150, 1300, 1500. default: 970 mA
+
+- qcom,switching-freq
+ Usage: optional
+ Value type: <u32>
+ Definition: Switching frequency in KHz. values are
+ 600, 640, 685, 738, 800, 872, 960, 1066, 1200, 1371,
+ 1600, 1920, 2400, 3200, 4800, 9600.
+ default: 800 KHz
+
+- qcom,ovp
+ Usage: optional
+ Value type: <u32>
+ Definition: Over-voltage protection limit in mV. values are 31100,
+ 29600, 19600, 18100.
+ default: 29600 mV
+
+- qcom,string-cfg
+ Usage: optional
+ Value type: <u32>
+ Definition: Bit mask of the wled strings. Bit 0 to 3 indicates strings
+ 0 to 3 respectively. Wled module has four strings of leds
+ numbered from 0 to 3. Each string of leds are operated
+ individually. Specify the strings using the bit mask. Any
+ combination of led strings can be used.
+ default value is 15 (b1111).
+
+- qcom,en-cabc
+ Usage: optional
+ Value type: <bool>
+ Definition: Specify if cabc (content adaptive backlight control) is
+ needed.
+
+Example:
+
+qcom-wled@d800 {
+ compatible = "qcom,pm8998-spmi-wled";
+ reg = <0xd800 0xd900>;
+ reg-names = "qcom-wled-ctrl-base", "qcom-wled-sink-base";
+ label = "backlight";
+
+ qcom,fs-current-limit = <25000>;
+ qcom,current-boost-limit = <970>;
+ qcom,switching-freq = <800>;
+ qcom,ovp = <29600>;
+ qcom,string-cfg = <15>;
+};
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 4e1d2ad..19ea799 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -306,6 +306,15 @@ config BACKLIGHT_PM8941_WLED
If you have the Qualcomm PM8941, say Y to enable a driver for the
WLED block.
+config BACKLIGHT_QCOM_SPMI_WLED
+ tristate "Qualcomm WLED Driver"
+ select REGMAP
+ help
+ If you have the Qualcomm WLED used for backlight control, say Y to
+ enable a driver for the WLED block. This driver provides the
+ interface to the display driver to adjust the brightness of the
+ display backlight. This supports PMI8998 currently.
+
config BACKLIGHT_SAHARA
tristate "Tabletkiosk Sahara Touch-iT Backlight Driver"
depends on X86
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index 5e28f01..f6627e5 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_BACKLIGHT_PANDORA) += pandora_bl.o
obj-$(CONFIG_BACKLIGHT_PCF50633) += pcf50633-backlight.o
obj-$(CONFIG_BACKLIGHT_PM8941_WLED) += pm8941-wled.o
obj-$(CONFIG_BACKLIGHT_PWM) += pwm_bl.o
+obj-$(CONFIG_BACKLIGHT_QCOM_SPMI_WLED) += qcom-spmi-wled.o
obj-$(CONFIG_BACKLIGHT_SAHARA) += kb3886_bl.o
obj-$(CONFIG_BACKLIGHT_SKY81452) += sky81452-backlight.o
obj-$(CONFIG_BACKLIGHT_TOSA) += tosa_bl.o
diff --git a/drivers/video/backlight/qcom-spmi-wled.c b/drivers/video/backlight/qcom-spmi-wled.c
new file mode 100644
index 0000000..14c3adc
--- /dev/null
+++ b/drivers/video/backlight/qcom-spmi-wled.c
@@ -0,0 +1,504 @@
+/*
+ * Copyright (c) 2017, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/backlight.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_address.h>
+#include <linux/regmap.h>
+
+/* General definitions */
+#define QCOM_WLED_DEFAULT_BRIGHTNESS 2048
+#define QCOM_WLED_MAX_BRIGHTNESS 4095
+
+/* WLED control registers */
+#define QCOM_WLED_CTRL_MOD_ENABLE 0x46
+#define QCOM_WLED_CTRL_MOD_EN_MASK BIT(7)
+#define QCOM_WLED_CTRL_MODULE_EN_SHIFT 7
+
+#define QCOM_WLED_CTRL_SWITCH_FREQ 0x4c
+#define QCOM_WLED_CTRL_SWITCH_FREQ_MASK GENMASK(3, 0)
+
+#define QCOM_WLED_CTRL_OVP 0x4d
+#define QCOM_WLED_CTRL_OVP_MASK GENMASK(1, 0)
+
+#define QCOM_WLED_CTRL_ILIM 0x4e
+#define QCOM_WLED_CTRL_ILIM_MASK GENMASK(2, 0)
+
+/* WLED sink registers */
+#define QCOM_WLED_SINK_CURR_SINK_EN 0x46
+#define QCOM_WLED_SINK_CURR_SINK_MASK GENMASK(7, 4)
+#define QCOM_WLED_SINK_CURR_SINK_SHFT 0x04
+
+#define QCOM_WLED_SINK_SYNC 0x47
+#define QCOM_WLED_SINK_SYNC_MASK GENMASK(3, 0)
+#define QCOM_WLED_SINK_SYNC_LED1 BIT(0)
+#define QCOM_WLED_SINK_SYNC_LED2 BIT(1)
+#define QCOM_WLED_SINK_SYNC_LED3 BIT(2)
+#define QCOM_WLED_SINK_SYNC_LED4 BIT(3)
+#define QCOM_WLED_SINK_SYNC_CLEAR 0x00
+
+#define QCOM_WLED_SINK_MOD_EN_REG(n) (0x50 + (n * 0x10))
+#define QCOM_WLED_SINK_REG_STR_MOD_MASK BIT(7)
+#define QCOM_WLED_SINK_REG_STR_MOD_EN BIT(7)
+
+#define QCOM_WLED_SINK_SYNC_DLY_REG(n) (0x51 + (n * 0x10))
+#define QCOM_WLED_SINK_FS_CURR_REG(n) (0x52 + (n * 0x10))
+#define QCOM_WLED_SINK_FS_MASK GENMASK(3, 0)
+
+#define QCOM_WLED_SINK_CABC_REG(n) (0x56 + (n * 0x10))
+#define QCOM_WLED_SINK_CABC_MASK BIT(7)
+#define QCOM_WLED_SINK_CABC_EN BIT(7)
+
+#define QCOM_WLED_SINK_BRIGHT_LSB_REG(n) (0x57 + (n * 0x10))
+#define QCOM_WLED_SINK_BRIGHT_MSB_REG(n) (0x58 + (n * 0x10))
+
+struct qcom_wled_config {
+ u32 i_boost_limit;
+ u32 ovp;
+ u32 switch_freq;
+ u32 fs_current;
+ u32 string_cfg;
+ bool en_cabc;
+};
+
+struct qcom_wled {
+ const char *name;
+ struct platform_device *pdev;
+ struct regmap *regmap;
+ u16 sink_addr;
+ u16 ctrl_addr;
+ u32 brightness;
+ bool prev_state;
+
+ struct qcom_wled_config cfg;
+};
+
+static int qcom_wled_module_enable(struct qcom_wled *wled, int val)
+{
+ int rc;
+
+ rc = regmap_update_bits(wled->regmap, wled->ctrl_addr +
+ QCOM_WLED_CTRL_MOD_ENABLE, QCOM_WLED_CTRL_MOD_EN_MASK,
+ val << QCOM_WLED_CTRL_MODULE_EN_SHIFT);
+ return rc;
+}
+
+static int qcom_wled_get_brightness(struct backlight_device *bl)
+{
+ struct qcom_wled *wled = bl_get_data(bl);
+
+ return wled->brightness;
+}
+
+static int qcom_wled_sync_toggle(struct qcom_wled *wled)
+{
+ int rc;
+
+ rc = regmap_update_bits(wled->regmap,
+ wled->sink_addr + QCOM_WLED_SINK_SYNC,
+ QCOM_WLED_SINK_SYNC_MASK, QCOM_WLED_SINK_SYNC_MASK);
+ if (rc < 0)
+ return rc;
+
+ rc = regmap_update_bits(wled->regmap,
+ wled->sink_addr + QCOM_WLED_SINK_SYNC,
+ QCOM_WLED_SINK_SYNC_MASK, QCOM_WLED_SINK_SYNC_CLEAR);
+
+ return rc;
+}
+
+static int qcom_wled_set_brightness(struct qcom_wled *wled, u16 brightness)
+{
+ int rc, i;
+ u16 low_limit = QCOM_WLED_MAX_BRIGHTNESS * 4 / 1000;
+ u8 string_cfg = wled->cfg.string_cfg;
+ u8 v[2];
+
+ /* WLED's lower limit of operation is 0.4% */
+ if (brightness > 0 && brightness < low_limit)
+ brightness = low_limit;
+
+ v[0] = brightness & 0xff;
+ v[1] = (brightness >> 8) & 0xf;
+
+ for (i = 0; (string_cfg >> i) != 0; i++) {
+ if (string_cfg & BIT(i)) {
+ rc = regmap_bulk_write(wled->regmap, wled->sink_addr +
+ QCOM_WLED_SINK_BRIGHT_LSB_REG(i), v, 2);
+ if (rc < 0)
+ return rc;
+ }
+ }
+
+ return 0;
+}
+
+static int qcom_wled_update_status(struct backlight_device *bl)
+{
+ struct qcom_wled *wled = bl_get_data(bl);
+ u16 brightness = bl->props.brightness;
+ int rc;
+
+ if (bl->props.power != FB_BLANK_UNBLANK ||
+ bl->props.fb_blank != FB_BLANK_UNBLANK ||
+ bl->props.state & BL_CORE_FBBLANK)
+ brightness = 0;
+
+ if (brightness) {
+ rc = qcom_wled_set_brightness(wled, brightness);
+ if (rc < 0) {
+ pr_err("wled failed to set brightness rc:%d\n", rc);
+ return rc;
+ }
+
+ if (!!brightness != wled->prev_state) {
+ rc = qcom_wled_module_enable(wled, !!brightness);
+ if (rc < 0) {
+ pr_err("wled enable failed rc:%d\n", rc);
+ return rc;
+ }
+ }
+ } else {
+ rc = qcom_wled_module_enable(wled, brightness);
+ if (rc < 0) {
+ pr_err("wled disable failed rc:%d\n", rc);
+ return rc;
+ }
+ }
+
+ wled->prev_state = !!brightness;
+
+ rc = qcom_wled_sync_toggle(wled);
+ if (rc < 0) {
+ pr_err("wled sync failed rc:%d\n", rc);
+ return rc;
+ }
+
+ wled->brightness = brightness;
+
+ return rc;
+}
+
+static int qcom_wled_setup(struct qcom_wled *wled)
+{
+ int rc, temp, i;
+ u8 sink_en = 0;
+ u8 string_cfg = wled->cfg.string_cfg;
+
+ rc = regmap_update_bits(wled->regmap,
+ wled->ctrl_addr + QCOM_WLED_CTRL_OVP,
+ QCOM_WLED_CTRL_OVP_MASK, wled->cfg.ovp);
+ if (rc < 0)
+ return rc;
+
+ rc = regmap_update_bits(wled->regmap,
+ wled->ctrl_addr + QCOM_WLED_CTRL_ILIM,
+ QCOM_WLED_CTRL_ILIM_MASK, wled->cfg.i_boost_limit);
+ if (rc < 0)
+ return rc;
+
+ rc = regmap_update_bits(wled->regmap,
+ wled->ctrl_addr + QCOM_WLED_CTRL_SWITCH_FREQ,
+ QCOM_WLED_CTRL_SWITCH_FREQ_MASK, wled->cfg.switch_freq);
+ if (rc < 0)
+ return rc;
+
+ for (i = 0; (string_cfg >> i) != 0; i++) {
+ if (string_cfg & BIT(i)) {
+ u16 addr = wled->sink_addr +
+ QCOM_WLED_SINK_MOD_EN_REG(i);
+
+ rc = regmap_update_bits(wled->regmap, addr,
+ QCOM_WLED_SINK_REG_STR_MOD_MASK,
+ QCOM_WLED_SINK_REG_STR_MOD_EN);
+ if (rc < 0)
+ return rc;
+
+ addr = wled->sink_addr +
+ QCOM_WLED_SINK_FS_CURR_REG(i);
+ rc = regmap_update_bits(wled->regmap, addr,
+ QCOM_WLED_SINK_FS_MASK,
+ wled->cfg.fs_current);
+ if (rc < 0)
+ return rc;
+
+ addr = wled->sink_addr +
+ QCOM_WLED_SINK_CABC_REG(i);
+ rc = regmap_update_bits(wled->regmap, addr,
+ QCOM_WLED_SINK_CABC_MASK,
+ wled->cfg.en_cabc ?
+ QCOM_WLED_SINK_CABC_EN : 0);
+ if (rc)
+ return rc;
+
+ temp = i + QCOM_WLED_SINK_CURR_SINK_SHFT;
+ sink_en |= 1 << temp;
+ }
+ }
+
+ rc = regmap_update_bits(wled->regmap,
+ wled->sink_addr + QCOM_WLED_SINK_CURR_SINK_EN,
+ QCOM_WLED_SINK_CURR_SINK_MASK, sink_en);
+ if (rc < 0)
+ return rc;
+
+ rc = qcom_wled_sync_toggle(wled);
+ if (rc < 0) {
+ pr_err("Failed to toggle sync reg rc:%d\n", rc);
+ return rc;
+ }
+
+ return 0;
+}
+
+static const struct qcom_wled_config wled_config_defaults = {
+ .i_boost_limit = 4,
+ .fs_current = 10,
+ .ovp = 1,
+ .switch_freq = 11,
+ .string_cfg = 0xf,
+ .en_cabc = 0,
+};
+
+struct qcom_wled_var_cfg {
+ const u32 *values;
+ u32 (*fn)(u32);
+ int size;
+};
+
+static const u32 wled_i_boost_limit_values[] = {
+ 105, 280, 450, 620, 970, 1150, 1300, 1500,
+};
+
+static const struct qcom_wled_var_cfg wled_i_boost_limit_cfg = {
+ .values = wled_i_boost_limit_values,
+ .size = ARRAY_SIZE(wled_i_boost_limit_values),
+};
+
+static const u32 wled_fs_current_values[] = {
+ 0, 2500, 5000, 7500, 10000, 12500, 15000, 17500, 20000,
+ 22500, 25000, 27500, 30000,
+};
+
+static const struct qcom_wled_var_cfg wled_fs_current_cfg = {
+ .values = wled_fs_current_values,
+ .size = ARRAY_SIZE(wled_fs_current_values),
+};
+
+static const u32 wled_ovp_values[] = {
+ 31100, 29600, 19600, 18100,
+};
+
+static const struct qcom_wled_var_cfg wled_ovp_cfg = {
+ .values = wled_ovp_values,
+ .size = ARRAY_SIZE(wled_ovp_values),
+};
+
+static u32 qcom_wled_switch_freq_values_fn(u32 idx)
+{
+ return 19200 / (2 * (1 + idx));
+}
+
+static const struct qcom_wled_var_cfg wled_switch_freq_cfg = {
+ .fn = qcom_wled_switch_freq_values_fn,
+ .size = 16,
+};
+
+static const struct qcom_wled_var_cfg wled_string_cfg = {
+ .size = 16,
+};
+
+static u32 qcom_wled_values(const struct qcom_wled_var_cfg *cfg, u32 idx)
+{
+ if (idx >= cfg->size)
+ return UINT_MAX;
+ if (cfg->fn)
+ return cfg->fn(idx);
+ if (cfg->values)
+ return cfg->values[idx];
+ return idx;
+}
+
+static int qcom_wled_configure(struct qcom_wled *wled, struct device *dev)
+{
+ struct qcom_wled_config *cfg = &wled->cfg;
+ const __be32 *prop_addr;
+ u32 val, c;
+ int rc, i, j;
+
+ const struct {
+ const char *name;
+ u32 *val_ptr;
+ const struct qcom_wled_var_cfg *cfg;
+ } u32_opts[] = {
+ {
+ "qcom,current-boost-limit",
+ &cfg->i_boost_limit,
+ .cfg = &wled_i_boost_limit_cfg,
+ },
+ {
+ "qcom,fs-current-limit",
+ &cfg->fs_current,
+ .cfg = &wled_fs_current_cfg,
+ },
+ {
+ "qcom,ovp",
+ &cfg->ovp,
+ .cfg = &wled_ovp_cfg,
+ },
+ {
+ "qcom,switching-freq",
+ &cfg->switch_freq,
+ .cfg = &wled_switch_freq_cfg,
+ },
+ {
+ "qcom,string-cfg",
+ &cfg->string_cfg,
+ .cfg = &wled_string_cfg,
+ },
+ };
+
+ const struct {
+ const char *name;
+ bool *val_ptr;
+ } bool_opts[] = {
+ { "qcom,en-cabc", &cfg->en_cabc, },
+ };
+
+ prop_addr = of_get_address(dev->of_node, 0, NULL, NULL);
+ if (!prop_addr) {
+ pr_err("invalid IO resources\n");
+ return -EINVAL;
+ }
+ wled->ctrl_addr = be32_to_cpu(*prop_addr);
+
+ prop_addr = of_get_address(dev->of_node, 1, NULL, NULL);
+ if (!prop_addr) {
+ pr_err("invalid IO resources\n");
+ return -EINVAL;
+ }
+ wled->sink_addr = be32_to_cpu(*prop_addr);
+ rc = of_property_read_string(dev->of_node, "label", &wled->name);
+ if (rc < 0)
+ wled->name = dev->of_node->name;
+
+ *cfg = wled_config_defaults;
+ for (i = 0; i < ARRAY_SIZE(u32_opts); ++i) {
+ rc = of_property_read_u32(dev->of_node, u32_opts[i].name, &val);
+ if (rc == -EINVAL) {
+ continue;
+ } else if (rc < 0) {
+ pr_err("error reading '%s'\n", u32_opts[i].name);
+ return rc;
+ }
+
+ c = UINT_MAX;
+ for (j = 0; c != val; j++) {
+ c = qcom_wled_values(u32_opts[i].cfg, j);
+ if (c == UINT_MAX) {
+ pr_err("invalid value for '%s'\n",
+ u32_opts[i].name);
+ return -EINVAL;
+ }
+
+ if (c == val)
+ break;
+ }
+
+ pr_debug("'%s' = %u\n", u32_opts[i].name, c);
+ *u32_opts[i].val_ptr = j;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(bool_opts); ++i) {
+ if (of_property_read_bool(dev->of_node, bool_opts[i].name))
+ *bool_opts[i].val_ptr = true;
+ }
+
+ return 0;
+}
+
+static const struct backlight_ops qcom_wled_ops = {
+ .update_status = qcom_wled_update_status,
+ .get_brightness = qcom_wled_get_brightness,
+};
+
+static int qcom_wled_probe(struct platform_device *pdev)
+{
+ struct backlight_properties props;
+ struct backlight_device *bl;
+ struct qcom_wled *wled;
+ struct regmap *regmap;
+ u32 val;
+ int rc;
+
+ regmap = dev_get_regmap(pdev->dev.parent, NULL);
+ if (!regmap) {
+ pr_err("Unable to get regmap\n");
+ return -EINVAL;
+ }
+
+ wled = devm_kzalloc(&pdev->dev, sizeof(*wled), GFP_KERNEL);
+ if (!wled)
+ return -ENOMEM;
+
+ wled->regmap = regmap;
+ wled->pdev = pdev;
+
+ rc = qcom_wled_configure(wled, &pdev->dev);
+ if (rc < 0) {
+ pr_err("wled configure failed rc:%d\n", rc);
+ return rc;
+ }
+
+ rc = qcom_wled_setup(wled);
+ if (rc < 0) {
+ pr_err("wled setup failed rc:%d\n", rc);
+ return rc;
+ }
+
+ val = QCOM_WLED_DEFAULT_BRIGHTNESS;
+ of_property_read_u32(pdev->dev.of_node, "default-brightness", &val);
+ wled->brightness = val;
+
+ platform_set_drvdata(pdev, wled);
+
+ memset(&props, 0, sizeof(struct backlight_properties));
+ props.type = BACKLIGHT_RAW;
+ props.brightness = val;
+ props.max_brightness = QCOM_WLED_MAX_BRIGHTNESS;
+ bl = devm_backlight_device_register(&pdev->dev, pdev->name,
+ &pdev->dev, wled,
+ &qcom_wled_ops, &props);
+ return PTR_ERR_OR_ZERO(bl);
+}
+
+static const struct of_device_id qcom_wled_match_table[] = {
+ { .compatible = "qcom,pm8998-spmi-wled",},
+ { },
+};
+
+static struct platform_driver qcom_wled_driver = {
+ .probe = qcom_wled_probe,
+ .driver = {
+ .name = "qcom-spmi-wled",
+ .of_match_table = qcom_wled_match_table,
+ },
+};
+
+module_platform_driver(qcom_wled_driver);
+
+MODULE_DESCRIPTION("Qualcomm SPMI PMIC WLED driver");
+MODULE_LICENSE("GPL v2");
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH V1 2/4] qcom: spmi-wled: Add support for short circuit handling
From: Kiran Gunda @ 2017-11-16 12:18 UTC (permalink / raw)
To: bjorn.andersson, linux-arm-msm, Lee Jones, Daniel Thompson,
Jingoo Han, Richard Purdie, Jacek Anaszewski, Pavel Machek,
Rob Herring, Mark Rutland, Bartlomiej Zolnierkiewicz, linux-leds,
devicetree, linux-kernel, linux-fbdev
Cc: linux-arm-msm-owner, Kiran Gunda
In-Reply-To: <1510834717-21765-1-git-send-email-kgunda@codeaurora.org>
Handle the short circuit(SC) interrupt and check if the SC interrupt
is valid. Re-enable the module to check if it goes away. Disable the
module altogether if the SC event persists.
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
---
.../bindings/leds/backlight/qcom-spmi-wled.txt | 22 ++++
drivers/video/backlight/qcom-spmi-wled.c | 126 ++++++++++++++++++++-
2 files changed, 142 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/leds/backlight/qcom-spmi-wled.txt b/Documentation/devicetree/bindings/leds/backlight/qcom-spmi-wled.txt
index f1ea25b..768608c 100644
--- a/Documentation/devicetree/bindings/leds/backlight/qcom-spmi-wled.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/qcom-spmi-wled.txt
@@ -74,6 +74,26 @@ The PMIC is connected to the host processor via SPMI bus.
Definition: Specify if cabc (content adaptive backlight control) is
needed.
+- qcom,ext-pfet-sc-pro-en
+ Usage: optional
+ Value type: <bool>
+ Definition: Specify if external PFET control for short circuit
+ protection is needed.
+
+- interrupts
+ Usage: optional
+ Value type: <prop encoded array>
+ Definition: Interrupts associated with WLED. Interrupts can be
+ specified as per the encoding listed under
+ Documentation/devicetree/bindings/spmi/
+ qcom,spmi-pmic-arb.txt.
+
+- interrupt-names
+ Usage: optional
+ Value type: <string>
+ Definition: Interrupt names associated with the interrupts.
+ Must be "sc-irq".
+
Example:
qcom-wled@d800 {
@@ -82,6 +102,8 @@ qcom-wled@d800 {
reg-names = "qcom-wled-ctrl-base", "qcom-wled-sink-base";
label = "backlight";
+ interrupts = <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "sc-irq";
qcom,fs-current-limit = <25000>;
qcom,current-boost-limit = <970>;
qcom,switching-freq = <800>;
diff --git a/drivers/video/backlight/qcom-spmi-wled.c b/drivers/video/backlight/qcom-spmi-wled.c
index 14c3adc..7dbaaa7 100644
--- a/drivers/video/backlight/qcom-spmi-wled.c
+++ b/drivers/video/backlight/qcom-spmi-wled.c
@@ -11,6 +11,9 @@
* GNU General Public License for more details.
*/
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/ktime.h>
#include <linux/kernel.h>
#include <linux/backlight.h>
#include <linux/module.h>
@@ -23,7 +26,13 @@
#define QCOM_WLED_DEFAULT_BRIGHTNESS 2048
#define QCOM_WLED_MAX_BRIGHTNESS 4095
+#define QCOM_WLED_SC_DLY_MS 20
+#define QCOM_WLED_SC_CNT_MAX 5
+#define QCOM_WLED_SC_RESET_CNT_DLY_US 1000000
+
/* WLED control registers */
+#define QCOM_WLED_CTRL_FAULT_STATUS 0x08
+
#define QCOM_WLED_CTRL_MOD_ENABLE 0x46
#define QCOM_WLED_CTRL_MOD_EN_MASK BIT(7)
#define QCOM_WLED_CTRL_MODULE_EN_SHIFT 7
@@ -37,6 +46,15 @@
#define QCOM_WLED_CTRL_ILIM 0x4e
#define QCOM_WLED_CTRL_ILIM_MASK GENMASK(2, 0)
+#define QCOM_WLED_CTRL_SHORT_PROTECT 0x5e
+#define QCOM_WLED_CTRL_SHORT_EN_MASK BIT(7)
+
+#define QCOM_WLED_CTRL_SEC_ACCESS 0xd0
+#define QCOM_WLED_CTRL_SEC_UNLOCK 0xa5
+
+#define QCOM_WLED_CTRL_TEST1 0xe2
+#define QCOM_WLED_EXT_FET_DTEST2 0x09
+
/* WLED sink registers */
#define QCOM_WLED_SINK_CURR_SINK_EN 0x46
#define QCOM_WLED_SINK_CURR_SINK_MASK GENMASK(7, 4)
@@ -71,19 +89,23 @@ struct qcom_wled_config {
u32 switch_freq;
u32 fs_current;
u32 string_cfg;
+ int sc_irq;
bool en_cabc;
+ bool ext_pfet_sc_pro_en;
};
struct qcom_wled {
const char *name;
struct platform_device *pdev;
struct regmap *regmap;
+ struct mutex lock;
+ struct qcom_wled_config cfg;
+ ktime_t last_sc_event_time;
u16 sink_addr;
u16 ctrl_addr;
u32 brightness;
+ u32 sc_count;
bool prev_state;
-
- struct qcom_wled_config cfg;
};
static int qcom_wled_module_enable(struct qcom_wled *wled, int val)
@@ -157,25 +179,26 @@ static int qcom_wled_update_status(struct backlight_device *bl)
bl->props.state & BL_CORE_FBBLANK)
brightness = 0;
+ mutex_lock(&wled->lock);
if (brightness) {
rc = qcom_wled_set_brightness(wled, brightness);
if (rc < 0) {
pr_err("wled failed to set brightness rc:%d\n", rc);
- return rc;
+ goto unlock_mutex;
}
if (!!brightness != wled->prev_state) {
rc = qcom_wled_module_enable(wled, !!brightness);
if (rc < 0) {
pr_err("wled enable failed rc:%d\n", rc);
- return rc;
+ goto unlock_mutex;
}
}
} else {
rc = qcom_wled_module_enable(wled, brightness);
if (rc < 0) {
pr_err("wled disable failed rc:%d\n", rc);
- return rc;
+ goto unlock_mutex;
}
}
@@ -184,19 +207,69 @@ static int qcom_wled_update_status(struct backlight_device *bl)
rc = qcom_wled_sync_toggle(wled);
if (rc < 0) {
pr_err("wled sync failed rc:%d\n", rc);
- return rc;
+ goto unlock_mutex;
}
wled->brightness = brightness;
+unlock_mutex:
+ mutex_unlock(&wled->lock);
return rc;
}
+static irqreturn_t qcom_wled_sc_irq_handler(int irq, void *_wled)
+{
+ struct qcom_wled *wled = _wled;
+ int rc;
+ u32 val;
+ s64 elapsed_time;
+
+ rc = regmap_read(wled->regmap,
+ wled->ctrl_addr + QCOM_WLED_CTRL_FAULT_STATUS, &val);
+ if (rc < 0) {
+ pr_err("Error in reading WLED_FAULT_STATUS rc=%d\n", rc);
+ return IRQ_HANDLED;
+ }
+
+ wled->sc_count++;
+ pr_err("WLED short circuit detected %d times fault_status=%x\n",
+ wled->sc_count, val);
+ mutex_lock(&wled->lock);
+ rc = qcom_wled_module_enable(wled, false);
+ if (rc < 0) {
+ pr_err("wled disable failed rc:%d\n", rc);
+ goto unlock_mutex;
+ }
+
+ elapsed_time = ktime_us_delta(ktime_get(),
+ wled->last_sc_event_time);
+ if (elapsed_time > QCOM_WLED_SC_RESET_CNT_DLY_US) {
+ wled->sc_count = 0;
+ } else if (wled->sc_count > QCOM_WLED_SC_CNT_MAX) {
+ pr_err("SC trigged %d times, disabling WLED forever!\n",
+ wled->sc_count);
+ goto unlock_mutex;
+ }
+
+ wled->last_sc_event_time = ktime_get();
+
+ msleep(QCOM_WLED_SC_DLY_MS);
+ rc = qcom_wled_module_enable(wled, true);
+ if (rc < 0)
+ pr_err("wled enable failed rc:%d\n", rc);
+
+unlock_mutex:
+ mutex_unlock(&wled->lock);
+
+ return IRQ_HANDLED;
+}
+
static int qcom_wled_setup(struct qcom_wled *wled)
{
int rc, temp, i;
u8 sink_en = 0;
u8 string_cfg = wled->cfg.string_cfg;
+ int sc_irq = wled->cfg.sc_irq;
rc = regmap_update_bits(wled->regmap,
wled->ctrl_addr + QCOM_WLED_CTRL_OVP,
@@ -261,6 +334,39 @@ static int qcom_wled_setup(struct qcom_wled *wled)
return rc;
}
+ if (sc_irq >= 0) {
+ rc = devm_request_threaded_irq(&wled->pdev->dev, sc_irq,
+ NULL, qcom_wled_sc_irq_handler, IRQF_ONESHOT,
+ "qcom_wled_sc_irq", wled);
+ if (rc < 0) {
+ pr_err("Unable to request sc(%d) IRQ(err:%d)\n",
+ sc_irq, rc);
+ return rc;
+ }
+
+ rc = regmap_update_bits(wled->regmap,
+ wled->ctrl_addr + QCOM_WLED_CTRL_SHORT_PROTECT,
+ QCOM_WLED_CTRL_SHORT_EN_MASK,
+ QCOM_WLED_CTRL_SHORT_EN_MASK);
+ if (rc < 0)
+ return rc;
+
+ if (wled->cfg.ext_pfet_sc_pro_en) {
+ /* unlock the secure access regisetr */
+ rc = regmap_write(wled->regmap, wled->ctrl_addr +
+ QCOM_WLED_CTRL_SEC_ACCESS,
+ QCOM_WLED_CTRL_SEC_UNLOCK);
+ if (rc < 0)
+ return rc;
+
+ rc = regmap_write(wled->regmap,
+ wled->ctrl_addr + QCOM_WLED_CTRL_TEST1,
+ QCOM_WLED_EXT_FET_DTEST2);
+ if (rc < 0)
+ return rc;
+ }
+ }
+
return 0;
}
@@ -271,6 +377,7 @@ static int qcom_wled_setup(struct qcom_wled *wled)
.switch_freq = 11,
.string_cfg = 0xf,
.en_cabc = 0,
+ .ext_pfet_sc_pro_en = 1,
};
struct qcom_wled_var_cfg {
@@ -376,6 +483,7 @@ static int qcom_wled_configure(struct qcom_wled *wled, struct device *dev)
bool *val_ptr;
} bool_opts[] = {
{ "qcom,en-cabc", &cfg->en_cabc, },
+ { "qcom,ext-pfet-sc-pro", &cfg->ext_pfet_sc_pro_en, },
};
prop_addr = of_get_address(dev->of_node, 0, NULL, NULL);
@@ -427,6 +535,10 @@ static int qcom_wled_configure(struct qcom_wled *wled, struct device *dev)
*bool_opts[i].val_ptr = true;
}
+ wled->cfg.sc_irq = platform_get_irq_byname(wled->pdev, "sc-irq");
+ if (wled->cfg.sc_irq < 0)
+ dev_dbg(&wled->pdev->dev, "sc irq is not used\n");
+
return 0;
}
@@ -469,6 +581,8 @@ static int qcom_wled_probe(struct platform_device *pdev)
return rc;
}
+ mutex_init(&wled->lock);
+
val = QCOM_WLED_DEFAULT_BRIGHTNESS;
of_property_read_u32(pdev->dev.of_node, "default-brightness", &val);
wled->brightness = val;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox