drm/panel: Add support for Samsung LTN101NT05 panel
Subsystems (6)
PATCH 1/2 drm/panel: Add support for Samsung LTN101NT05 panel
The Samsung LNT101NT05 10.1" WXVGA panel can be supported by the simple panel driver.
---
This isn't strickly required to get the panel up, but Thierry suggested on IRC to include it anyway, in case someone else has some use for it.
.../bindings/panel/samsung,ltn101nt05.txt | 7 +++++ drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/panel/samsung,ltn101nt05.txt
Documentation/devicetree/bindings/panel/samsung,ltn101nt05.txt new file +7 -0
@@ -0,0 +1,7 @@ +Samsung Electronics 10.1" WSVGA TFT LCD panel + +Required properties: +- compatible: should be "samsung,ltn101nt05" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory.
drivers/gpu/drm/panel/panel-simple.c +25 -0
@@ -338,6 +338,28 @@ static const struct panel_desc chunghwa_claa101wb01 = { }, }; +static const struct drm_display_mode samsung_ltn101nt05_mode = { + .clock =54030 , + .hdisplay =1024 , + .hsync_start =1024 +24 , + .hsync_end =1024 +24 +136 , + .htotal =1024 +24 +136 +160 , + .vdisplay =600 , + .vsync_start =600 +3 , + .vsync_end =600 +3 +6 , + .vtotal =600 +3 +6 +61 , + .vrefresh =60 , +}; + +static const struct panel_desc samsung_ltn101nt05 = { + .modes = &samsung_ltn101nt05_mode, + .num_modes =1 , + .size = { + .width =1024 , + .height =600 , + }, +}; +static const struct of_device_id platform_of_match[] = { { .compatible ="auo,b101aw03" ,
@@ -346,6 +368,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "chunghwa,claa101wb01", .data = &chunghwa_claa101wb01 }, { + .compatible = "samsung,ltn101nt05", + .data = &samsung_ltn101nt05, + }, { .compatible = "simple-panel", }, { /* sentinel */
Signature · 1 line
1.7.9.5
PATCH 2/2 ARM: tegra: paz00: Add LVDS support to device tree
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
---
This should enable everything needed. Unfortunately, in my tests it only switches on the backlight, but the display controller blocks in some infinit loop, so we get no output (and no working system). I post it here in case I missed something obvious...
arch/arm/boot/dts/tegra20-paz00.dts | 46 ++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra20-paz00.dts +45 -1
@@ -17,6 +17,14 @@ }; host1x at 50000000 { + dc at 54200000 { + rgb { + status = "okay"; + + nvidia,panel = <&panel>; + }; + }; + hdmi at 54280000 { status = "okay";
@@ -257,7 +265,11 @@ status = "okay"; }; - i2c at 7000c000 { + pwm: pwm at 7000a000 { + status = "okay"; + }; + + lvds_ddc: i2c at 7000c000 { status = "okay"; clock-frequency = <400000>;
@@ -475,6 +487,18 @@ non-removable; }; + backlight: backlight { + compatible = "pwm-backlight"; + + enable-gpios = <&gpio TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>; + pwms = <&pwm 0 5000000>; + + brightness-levels = <0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 255>; + default-brightness-level = <10>; + + backlight-boot-off; + }; + clocks { compatible = "simple-bus"; #address-cells = <1>;
@@ -509,6 +533,16 @@ }; }; + panel: panel { + compatible = "samsung,ltn101nt05", "simple-panel"; + + ddc-i2c-bus = <&lvds_ddc>; + power-supply = <&vdd_pnl_reg>; + enable-gpios = <&gpio TEGRA_GPIO(M, 6) GPIO_ACTIVE_HIGH>; + + backlight = <&backlight>; + }; + regulators { compatible = "simple-bus"; #address-cells = <1>;
@@ -522,6 +556,16 @@ regulator-max-microvolt = <5000000>; regulator-always-on; }; + + vdd_pnl_reg: regulator at 1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "+3VS,vdd_pnl"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio TEGRA_GPIO(A, 4) GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; sound {
Signature · 1 line
1.7.9.5
PATCH 2/2 ARM: tegra: paz00: Add LVDS support to device tree
Sorry, Stephen, I mistyped your email address in the first post.
Quoted 8 lines · On Saturday 21 December 2013 21:38:13 Marc Dietrich wrote:
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
Signed-off-by Marc Dietrich <[email protected]>---
This should enable everything needed. Unfortunately, in my tests it only switches on the backlight, but the display controller blocks in some infinit loop, so we get no output (and no working system). I post it here in case I missed something obvious...
In fact it turns out to be some heisenbug because in one out of ten tries it actually works. The other nine cases it prints:
[ 1.995067] rfkill_gpio rfkill_gpio: wifi_rfkill device registered.
[ 2.001459] Registering SWP/SWPB emulation handler
[ 2.011632] [drm:drm_get_minor],
[ 2.016473] [drm:drm_get_minor], new minor assigned 64
[ 2.021648] [drm:drm_get_minor],
[ 2.026319] [drm:drm_get_minor], new minor assigned 0
[ 2.033465] [drm:drm_sysfs_connector_add], adding "HDMI-A-1" to sysfs
[ 2.040402] [drm:drm_sysfs_hotplug_event], generating hotplug event
[ 2.048115] [drm:drm_sysfs_connector_add], adding "LVDS-1" to sysfs
[ 2.054642] [drm:drm_sysfs_hotplug_event], generating hotplug event
[ 2.061341] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.068027] [drm] No driver support for vblank timestamp query.
[ 2.094947] random: nonblocking pool is initialized
[ 240.885976] INFO: task swapper/0:1 blocked for more than 120 seconds.
[ 240.892462] Not tainted 3.13.0-rc4-next-20131220-00003-gbcf12ec #11
[ 240.900030] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
this message.
[ 240.907997] swapper/0 D c05653b8 0 1 0 0x00000000
[ 240.914457] [<c05653b8>] (__schedule) from [<c0564bcc>]
(schedule_timeout+0x174/0x1ec)
[ 240.922512] [<c0564bcc>] (schedule_timeout) from [<c056603c>]
(wait_for_common+0xb0/0x144)
[ 240.930913] [<c056603c>] (wait_for_common) from [<c0038db8>]
(flush_workqueue+0xec/0x570)
[ 240.939227] [<c0038db8>] (flush_workqueue) from [<c02b7048>]
(deferred_probe_initcall+0x50/0x80)
[ 240.948143] [<c02b7048>] (deferred_probe_initcall) from [<c00089f4>]
(do_one_initcall+0xe4/0x140)
[ 240.957179] [<c00089f4>] (do_one_initcall) from [<c0784be8>]
(kernel_init_freeable+0xfc/0x1c8)
[ 240.965936] [<c0784be8>] (kernel_init_freeable) from [<c055eb94>]
(kernel_init+0x8/0x118)
[ 240.974180] [<c055eb94>] (kernel_init) from [<c000e678>]
(ret_from_fork+0x14/0x3c)
[ 261.904891] INFO: rcu_preempt self-detected stall on CPU { 0} (t=2100
jiffies g=4294967023 c=4294967022 q=1)
[ 261.914827] CPU: 0 PID: 55 Comm: kworker/u4:2 Not tainted 3.13.0-rc4-
next-20131220-00003-gbcf12ec #11
[ 261.924042] Workqueue: deferwq deferred_probe_work_func
[ 261.929285] [<c0015b2c>] (unwind_backtrace) from [<c00117e0>]
(show_stack+0x10/0x14)
[ 261.937036] [<c00117e0>] (show_stack) from [<c0563180>]
(dump_stack+0x80/0xcc)
[ 261.944261] [<c0563180>] (dump_stack) from [<c006ce00>]
(rcu_check_callbacks+0x408/0x850)
[ 261.952442] [<c006ce00>] (rcu_check_callbacks) from [<c002fbe0>]
(update_process_times+0x38/0x58)
[ 261.961312] [<c002fbe0>] (update_process_times) from [<c0076894>]
(tick_sched_timer+0x44/0x74)
[ 261.969929] [<c0076894>] (tick_sched_timer) from [<c00422a4>]
(__run_hrtimer.isra.15+0x58/0x114)
[ 261.978711] [<c00422a4>] (__run_hrtimer.isra.15) from [<c0042bd0>]
(hrtimer_interrupt+0xfc/0x288)
[ 261.987579] [<c0042bd0>] (hrtimer_interrupt) from [<c001509c>]
(twd_handler+0x2c/0x40)
[ 261.995500] [<c001509c>] (twd_handler) from [<c006719c>]
(handle_percpu_devid_irq+0x68/0x84)
[ 262.003935] [<c006719c>] (handle_percpu_devid_irq) from [<c0063b14>]
(generic_handle_irq+0x20/0x30)
[ 262.012977] [<c0063b14>] (generic_handle_irq) from [<c000ee94>]
(handle_IRQ+0x38/0x94)
[ 262.020890] [<c000ee94>] (handle_IRQ) from [<c0008698>]
(gic_handle_irq+0x28/0x5c)
[ 262.028456] [<c0008698>] (gic_handle_irq) from [<c0012300>]
(__irq_svc+0x40/0x70)
[ 262.035931] Exception stack(0xdb29bc98 to 0xdb29bce0)
[ 262.040974] bc80:
c0814780 00000000
[ 262.049145] bca0: ffff8ba1 00000000 00000002 0000001d 00000000 db29a000
00000002 c07c6080
[ 262.057316] bcc0: 00000000 db860000 00000000 db29bce0 c0029898 c0029914
20000113 ffffffff
[ 262.065500] [<c0012300>] (__irq_svc) from [<c0029914>]
(__do_softirq+0x8c/0x208)
[ 262.072895] [<c0029914>] (__do_softirq) from [<c0029dd0>]
(irq_exit+0xa0/0xec)
[ 262.080115] [<c0029dd0>] (irq_exit) from [<c000ee98>]
(handle_IRQ+0x3c/0x94)
[ 262.087158] [<c000ee98>] (handle_IRQ) from [<c0008698>]
(gic_handle_irq+0x28/0x5c)
[ 262.094723] [<c0008698>] (gic_handle_irq) from [<c0012300>]
(__irq_svc+0x40/0x70)
[ 262.102197] Exception stack(0xdb29bd50 to 0xdb29bd98)
[ 262.107243] bd40: c0814114 a0000113
00000000 e0a00000
[ 262.115413] bd60: db2f9410 c07cc3d0 00000020 db2f9810 00000002 00000000
00000000 db860000
[ 262.123582] bd80: 00000000 db29bd98 c02a3b6c c02a3b84 60000113 ffffffff
[ 262.130198] [<c0012300>] (__irq_svc) from [<c02a3b84>]
(tegra_output_rgb_disable+0x58/0xe0)
[ 262.138548] [<c02a3b84>] (tegra_output_rgb_disable) from [<c02a360c>]
(tegra_encoder_dpms+0x68/0xc0)
[ 262.147675] [<c02a360c>] (tegra_encoder_dpms) from [<c02808ac>]
(drm_encoder_disable+0x64/0x68)
[ 262.156370] [<c02808ac>] (drm_encoder_disable) from [<c02809b8>]
(drm_helper_disable_unused_functions+0x108/0x134)
[ 262.166713] [<c02809b8>] (drm_helper_disable_unused_functions) from
[<c029f5dc>] (tegra_drm_fb_init+0x88/0x110)
[ 262.176794] [<c029f5dc>] (tegra_drm_fb_init) from [<c029e32c>]
(tegra_drm_load+0x94/0xc0)
[ 262.184977] [<c029e32c>] (tegra_drm_load) from [<c028c904>]
(drm_dev_register+0x70/0x130)
[ 262.193151] [<c028c904>] (drm_dev_register) from [<c029df14>]
(drm_host1x_init+0x2c/0x88)
[ 262.201328] [<c029df14>] (drm_host1x_init) from [<c02ab7b0>]
(host1x_subdev_register+0xb4/0xd0)
[ 262.210024] [<c02ab7b0>] (host1x_subdev_register) from [<c02abf00>]
(host1x_client_register+0xf4/0x11c)
[ 262.219412] [<c02abf00>] (host1x_client_register) from [<c02a21ec>]
(tegra_dc_probe+0x118/0x1ec)
[ 262.228196] [<c02a21ec>] (tegra_dc_probe) from [<c02b86d4>]
(platform_drv_probe+0x18/0x48)
[ 262.236457] [<c02b86d4>] (platform_drv_probe) from [<c02b7334>]
(driver_probe_device+0x118/0x234)
[ 262.245334] [<c02b7334>] (driver_probe_device) from [<c02b5a6c>]
(bus_for_each_drv+0x44/0x8c)
[ 262.253855] [<c02b5a6c>] (bus_for_each_drv) from [<c02b71e4>]
(device_attach+0x70/0x88)
[ 262.261854] [<c02b71e4>] (device_attach) from [<c02b68ec>]
(bus_probe_device+0x84/0xa8)
[ 262.269853] [<c02b68ec>] (bus_probe_device) from [<c02b6cdc>]
(deferred_probe_work_func+0x60/0x8c)
[ 262.278808] [<c02b6cdc>] (deferred_probe_work_func) from [<c0039da4>]
(process_one_work+0xfc/0x350)
[ 262.287850] [<c0039da4>] (process_one_work) from [<c003a3fc>]
(worker_thread+0x13c/0x384)
[ 262.296022] [<c003a3fc>] (worker_thread) from [<c003facc>]
(kthread+0xc4/0xe0)
[ 262.303242] [<c003facc>] (kthread) from [<c000e678>] (ret_from_fork+0x14/0x3c)
Marc
Quoted 38 lines
arch/arm/boot/dts/tegra20-paz00.dts | 46++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-)
(quoted diff) +0
-0
b/arch/arm/boot/dts/tegra20-paz00.dtsindex c7cd8e6..9a39a80 100644arch/arm/boot/dts/tegra20-paz00.dts +13
-1@@ -17,6 +17,14 @@ }; host1x at 50000000 { + dc at 54200000 { + rgb { + status = "okay"; + + nvidia,panel = <&panel>; + }; + }; + hdmi at 54280000 { status = "okay";@@ -257,7 +265,11 @@ status = "okay"; }; - i2c at 7000c000 { + pwm: pwm at 7000a000 { + status = "okay"; + }; + + lvds_ddc: i2c at 7000c000 { status = "okay"; clock-frequency = <400000>;
arch/arm/boot/dts/tegra20-paz00.dts line 496
Quoted 10 lines
arch/arm/boot/dts/tegra20-paz00.dts +7
-0@@ -475,6 +487,18 @@ non-removable; }; + backlight: backlight { + compatible = "pwm-backlight"; + + enable-gpios = <&gpio TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>; + pwms = <&pwm 0 5000000>; + + brightness-levels = <0 16 32 48 64 80 96 112 128 144 160 176 192 208
224
Quoted 42 lines
arch/arm/boot/dts/tegra20-paz00.dts +24
-0240 255>; + default-brightness-level = <10>; + + backlight-boot-off; + }; + clocks { compatible = "simple-bus"; #address-cells = <1>;@@ -509,6 +533,16 @@ }; }; + panel: panel { + compatible = "samsung,ltn101nt05", "simple-panel"; + + ddc-i2c-bus = <&lvds_ddc>; + power-supply = <&vdd_pnl_reg>; + enable-gpios = <&gpio TEGRA_GPIO(M, 6) GPIO_ACTIVE_HIGH>; + + backlight = <&backlight>; + }; + regulators { compatible = "simple-bus"; #address-cells = <1>;@@ -522,6 +556,16 @@ regulator-max-microvolt = <5000000>; regulator-always-on; }; + + vdd_pnl_reg: regulator at 1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "+3VS,vdd_pnl"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio TEGRA_GPIO(A, 4) GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; sound {
PATCH 2/2 ARM: tegra: paz00: Add LVDS support to device tree
Quoted 11 lines · On Saturday 21 December 2013 23:11:58 Marc Dietrich wrote:
Sorry, Stephen, I mistyped your email address in the first post.
Quoted 8 lines · On Saturday 21 December 2013 21:38:13 Marc Dietrich wrote:
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
Signed-off-by Marc Dietrich <[email protected]>---
This should enable everything needed. Unfortunately, in my tests it only switches on the backlight, but the display controller blocks in some infinit loop, so we get no output (and no working system). I post it here in case I missed something obvious...
Some users reported that it works when using uboot (yeah, shame on me that I still use fastboot on my dev machine), so I did a bit more research. It indeed works when using uboot, even when the display setup is disabled there. So my guess is that maybe some clock isn't setup by fastboot which is done by uboot.
Marc
PATCH 2/2 ARM: tegra: paz00: Add LVDS support to device tree
Quoted 14 lines · On Thursday 26 December 2013 14:52:10 Marc Dietrich wrote:
Quoted 12 lines · On Saturday 21 December 2013 23:11:58 Marc Dietrich wrote:
Sorry, Stephen, I mistyped your email address in the first post.
Quoted 9 lines · On Saturday 21 December 2013 21:38:13 Marc Dietrich wrote:
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
Signed-off-by Marc Dietrich <[email protected]>---
This should enable everything needed. Unfortunately, in my tests it only switches on the backlight, but the display controller blocks in some infinit loop, so we get no output (and no working system). I post it here
in case I missed something obvious...
Quoted 5 lines
Some users reported that it works when using uboot (yeah, shame on me that I still use fastboot on my dev machine), so I did a bit more research. It indeed works when using uboot, even when the display setup is disabled there. So my guess is that maybe some clock isn't setup by fastboot which is done by uboot.
ok, to bring this self-conversation to an end, the cpu blocks at a memory barrier right after
value = tegra_dc_readl(rgb->dc, DC_CMD_DISPLAY_COMMAND);
in tegra_output_rgb_disable (rgb.c).
PATCH 2/2 ARM: tegra: paz00: Add LVDS support to device tree
In reply to Marc DietrichQuoted 7 lines · Marc Dietrich
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
Signed-off-by Marc Dietrich <[email protected]>---
This should enable everything needed. Unfortunately, in my tests it only switches on the backlight, but the display controller blocks in some infinit loop, so we get no output (and no working system). I post it here in case I missed something obvious...
As mentioned later on, this works fine with U-Boot (and tests fine here too), so I plan to apply this for 3.15, once I can.
PATCH 2/2 ARM: tegra: paz00: Add LVDS support to device tree
Am Montag, 6. Januar 2014, 12:38:20 schrieb Stephen Warren:
Quoted 11 lines · Marc Dietrich
Quoted 8 lines
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
Signed-off-by Marc Dietrich <[email protected]>---
This should enable everything needed. Unfortunately, in my tests it only switches on the backlight, but the display controller blocks in some infinit loop, so we get no output (and no working system). I post it here in case I missed something obvious...As mentioned later on, this works fine with U-Boot (and tests fine here too), so I plan to apply this for 3.15, once I can.
huh? I thought this can go into 3.14 if possible. Patch is harmless and the merge window still weeks away.
PATCH 2/2 ARM: tegra: paz00: Add LVDS support to device tree
Quoted 10 lines · Marc Dietrich
Am Montag, 6. Januar 2014, 12:38:20 schrieb Stephen Warren:
Quoted 9 lines · Marc Dietrich
Quoted 8 lines
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
Signed-off-by Marc Dietrich <[email protected]>---
This should enable everything needed. Unfortunately, in my tests it only switches on the backlight, but the display controller blocks in some infinit loop, so we get no output (and no working system). I post it here in case I missed something obvious...
Quoted 5 lines
Quoted 2 lines
As mentioned later on, this works fine with U-Boot (and tests fine here too), so I plan to apply this for 3.15, once I can.
huh? I thought this can go into 3.14 if possible. Patch is harmless and the merge window still weeks away.
The cut-off for new features was at least a week ago. I expect the merge window will open this weekend.
PATCH 2/2 ARM: tegra: paz00: Add LVDS support to device tree
Am Montag, 6. Januar 2014, 15:34:01 schrieb Stephen Warren:
Quoted 16 lines · Marc Dietrich
Quoted 15 lines
Am Montag, 6. Januar 2014, 12:38:20 schrieb Stephen Warren:
Quoted 13 lines · Marc Dietrich
Quoted 9 lines
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
Signed-off-by Marc Dietrich <[email protected]>---
This should enable everything needed. Unfortunately, in my tests it only switches on the backlight, but the display controller blocks in some infinit loop, so we get no output (and no working system). I post it here
in case I missed something obvious...As mentioned later on, this works fine with U-Boot (and tests fine here too), so I plan to apply this for 3.15, once I can.
Quoted 6 lines
Quoted 3 lines
huh? I thought this can go into 3.14 if possible. Patch is harmless and the
merge window still weeks away.The cut-off for new features was at least a week ago. I expect the merge window will open this weekend.
AFAIK, there will be an rc8 (and maybe also an rc9 due to the xmas vacations). I submitted the patchset two days after the LVDS support for the other boards was sent. Ok, there needs to be some deadline and I may have missed it, but it would be really unfortune to miss 3.14 because that's the last missing piece.
Stephen Warren
AppliedPATCH 2/2 ARM: tegra: paz00: Add LVDS support to device tree
In reply to Marc DietrichQuoted 1 line · Marc Dietrich
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
Applied to Tegra's for-3.15/dt branch.
Quoted 2 lines · Marc Dietrich
The Samsung LNT101NT05 10.1" WXVGA panel can be supported by the simple panel driver.
Thierry, I assume you'll take patch 1/2 throught the appropriate DRM tree.
Quoted 5 lines · Stephen Warren
Quoted 2 lines · Marc Dietrich
The Samsung LNT101NT05 10.1" WXVGA panel can be supported by the simple panel driver.
Thierry, I assume you'll take patch 1/2 throught the appropriate DRM tree.
Yes, will do.
Thierry
Quoted 10 lines · Marc Dietrich
The Samsung LNT101NT05 10.1" WXVGA panel can be supported by the simple panel driver.
Cc linux-fbdev at vger.kernel.orgCc dri-devel at lists.freedesktop.orgCc David Airlie <[email protected]>Signed-off-by Marc Dietrich <[email protected]>---
This isn't strickly required to get the panel up, but Thierry suggested on IRC to include it anyway, in case someone else has some use for it.
For the record: the reason this isn't strictly needed is because there's an EDID that can be probed to get the video timings. But the panel still can be supported using the timings from the datasheet. One example where this would be useful is when the EDID isn't connected or simply broken.
That said: applied, thanks!
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140108/20c2e49f/attachment-0001.sig>