Add LCD support for Pine64 Pinebook 1080p
Subsystems (6)
v2 cover Add LCD support for Pine64 Pinebook 1080p
Since ANX6345 driver has been merged we can add support for Pinebook LCD
This is a follow up on [1] which attempted to add support for all the A64-based Pinebooks.
Since patches for 768p were dropped we don't need edp-connector binding discussed in [1] and its earlier versions and we can use panel-simple binding as everyone else does.
If we ever going to add support for 768p we can do it through dt-overlay with appropriate panel node or by teaching bootloader to patch dtb with correct panel compatible.
Similar approach was chosen in [2]
[1] https://patchwork.kernel.org/cover/10814169/
[2] https://patchwork.kernel.org/patch/11277765/
v2:
- Collect r-b tags
- Don't print devm_regulator_get() error only if it is -EPROBE_DEFER
- Keep compatibles alphabetically sorted in panel-simple.yaml
- Properly indent new panel modes
- Drop #address-cells, #size-cells properties and @0 suffix of endpoints in sun50i-a64-pinebook.dts
Icenowy Zheng (1):
arm64: allwinner: a64: enable LCD-related hardware for Pinebook
Samuel Holland (1):
drm/bridge: anx6345: Fix getting anx6345 regulators
Vasily Khoruzhick (4):
drm/bridge: anx6345: don't print error message if regulator is not
ready
dt-bindings: Add Guangdong Neweast Optoelectronics CO. LTD vendor
prefix
dt-bindings: display: simple: Add NewEast Optoelectronics WJFH116008A
compatible
drm/panel: simple: Add NewEast Optoelectronics CO., LTD WJFH116008A
panel support
.../bindings/display/panel/panel-simple.yaml | 2 + .../devicetree/bindings/vendor-prefixes.yaml | 2 + .../dts/allwinner/sun50i-a64-pinebook.dts | 61 ++++++++++++++++++- .../drm/bridge/analogix/analogix-anx6345.c | 12 ++-- drivers/gpu/drm/panel/panel-simple.c | 48 +++++++++++++++ 5 files changed, 120 insertions(+), 5 deletions(-)
Signature · 1 line
2.25.0
PATCH v2 1/6 drm/bridge: anx6345: Fix getting anx6345 regulators
From: Samuel Holland <[email protected]>
We don't need to pass '-supply' suffix to devm_regulator_get()
--- drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c +2 -2
@@ -712,14 +712,14 @@ static int anx6345_i2c_probe(struct i2c_client *client,DRM_DEBUG ("No panel found\n" );/* 1.2V digital core power regulator */ - anx6345->dvdd12 =devm_regulator_get (dev,"dvdd12-supply" ); + anx6345->dvdd12 =devm_regulator_get (dev,"dvdd12" );if (IS_ERR (anx6345->dvdd12)) {DRM_ERROR ("dvdd12-supply not found\n" );return PTR_ERR (anx6345->dvdd12); }/* 2.5V digital core power regulator */ - anx6345->dvdd25 =devm_regulator_get (dev,"dvdd25-supply" ); + anx6345->dvdd25 =devm_regulator_get (dev,"dvdd25" );if (IS_ERR (anx6345->dvdd25)) {DRM_ERROR ("dvdd25-supply not found\n" );return PTR_ERR (anx6345->dvdd25);
Signature · 1 line
2.25.0
Re: [PATCH v2 1/6] drm/bridge: anx6345: Fix getting anx6345 regulators
Quoted 2 lines · Vasily Khoruzhick
From: Samuel Holland <[email protected]>
This patch can be dropped since equivalent was merged:
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=6726ca1a2d531f5a6efc1f785b15606ce837c4dc
Quoted 34 lines
We don't need to pass '-supply' suffix to
devm_regulator_get()Fixes 6aa192698089 ("drm/bridge: Add Analogix anx6345 support")Reviewed-by Laurent Pinchart <[email protected]>Signed-off-by Samuel Holland <[email protected]>Signed-off-by Vasily Khoruzhick <[email protected]>--- drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/bridge/analogix/analogix-anx6345.c +2
-3@@ -712,14 +712,14 @@ static int anx6345_i2c_probe(struct i2c_client *client,DRM_DEBUG ("No panel found\n" );/* 1.2V digital core power regulator */ - anx6345->dvdd12 =devm_regulator_get (dev,"dvdd12-supply" ); + anx6345->dvdd12 =devm_regulator_get (dev,"dvdd12" );if (IS_ERR (anx6345->dvdd12)) {DRM_ERROR ("dvdd12-supply not found\n" );return PTR_ERR (anx6345->dvdd12); }/* 2.5V digital core power regulator */ - anx6345->dvdd25 =devm_regulator_get (dev,"dvdd25-supply" ); + anx6345->dvdd25 =devm_regulator_get (dev,"dvdd25" );if (IS_ERR (anx6345->dvdd25)) {DRM_ERROR ("dvdd25-supply not found\n" );return PTR_ERR (anx6345->dvdd25); --2.25.0
PATCH v2 2/6 drm/bridge: anx6345: don't print error message if regulator is not ready
In reply to Vasily KhoruzhickWe don't want to print scary message if devm_regulator_get() returns -EPROBE_DEFER
--- drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c +6 -2
@@ -714,14 +714,18 @@ static int anx6345_i2c_probe(struct i2c_client *client,/* 1.2V digital core power regulator */ anx6345->dvdd12 =devm_regulator_get (dev,"dvdd12" );if (IS_ERR (anx6345->dvdd12)) { -DRM_ERROR ("dvdd12-supply not found\n" ); +if (PTR_ERR (anx6345->dvdd12) != -EPROBE_DEFER ) +DRM_ERROR ("Failed to get dvdd12 supply (%ld)\n" , +PTR_ERR (anx6345->dvdd12));return PTR_ERR (anx6345->dvdd12); }/* 2.5V digital core power regulator */ anx6345->dvdd25 =devm_regulator_get (dev,"dvdd25" );if (IS_ERR (anx6345->dvdd25)) { -DRM_ERROR ("dvdd25-supply not found\n" ); +if (PTR_ERR (anx6345->dvdd25) != -EPROBE_DEFER ) +DRM_ERROR ("Failed to get dvdd25 supply (%ld)\n" , +PTR_ERR (anx6345->dvdd25));return PTR_ERR (anx6345->dvdd25); }
Signature · 6 lines
2.25.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 3/6 dt-bindings: Add Guangdong Neweast Optoelectronics CO. LTD vendor prefix
In reply to Vasily KhoruzhickAdd vendor prefix for Guangdong Neweast Optoelectronics CO. LTD
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -661,6 +661,8 @@ patternProperties: description: Netron DY "^netxeon,.*": description: Shenzhen Netxeon Technology CO., LTD + "^neweast,.*": + description: Guangdong Neweast Optoelectronics CO., LTD "^nexbox,.*": description: Nexbox "^nextthing,.*":
Signature · 6 lines
2.25.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 3/6] dt-bindings: Add Guangdong Neweast Optoelectronics CO. LTD vendor prefix
Quoted 6 lines · Vasily Khoruzhick
Add vendor prefix for Guangdong Neweast Optoelectronics CO. LTD
Signed-off-by Vasily Khoruzhick <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
PATCH v2 4/6 dt-bindings: display: simple: Add NewEast Optoelectronics WJFH116008A compatible
In reply to Vasily KhoruzhickThis commit adds compatible for NewEast Optoelectronics WJFH116008A panel to panel-simple binding
--- .../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/display/panel/panel-simple.yaml +2 -0
@@ -39,6 +39,8 @@ properties: - boe,nv140fhmn49 # GiantPlus GPM940B0 3.0" QVGA TFT LCD panel - giantplus,gpm940b0 + # NewEast Optoelectronics CO., LTD WJFH116008A eDP TFT LCD panel + - neweast,wjfh116008a # Satoz SAT050AT40H12R2 5.0" WVGA TFT LCD panel - satoz,sat050at40h12r2 # Sharp LS020B1DD01D 2.0" HQVGA TFT LCD panel
Signature · 1 line
2.25.0
PATCH v2 5/6 drm/panel: simple: Add NewEast Optoelectronics CO., LTD WJFH116008A panel support
In reply to Vasily KhoruzhickThis commit adds support for the NewEast Optoelectronics CO., LTD WJFH116008A 11.6" 1920x1080 TFT LCD panel.
--- drivers/gpu/drm/panel/panel-simple.c | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+)
drivers/gpu/drm/panel/panel-simple.c +48 -0
@@ -2224,6 +2224,51 @@ static const struct panel_desc netron_dy_e231732 = { .bus_format = MEDIA_BUS_FMT_RGB666_1X18, }; +static const struct drm_display_mode neweast_wjfh116008a_modes[] = { + { + .clock =138500 , + .hdisplay =1920 , + .hsync_start =1920 +48 , + .hsync_end =1920 +48 +32 , + .htotal =1920 +48 +32 +80 , + .vdisplay =1080 , + .vsync_start =1080 +3 , + .vsync_end =1080 +3 +5 , + .vtotal =1080 +3 +5 +23 , + .vrefresh =60 , + .flags =DRM_MODE_FLAG_NVSYNC |DRM_MODE_FLAG_NHSYNC , + }, { + .clock =110920 , + .hdisplay =1920 , + .hsync_start =1920 +48 , + .hsync_end =1920 +48 +32 , + .htotal =1920 +48 +32 +80 , + .vdisplay =1080 , + .vsync_start =1080 +3 , + .vsync_end =1080 +3 +5 , + .vtotal =1080 +3 +5 +23 , + .vrefresh =48 , + .flags =DRM_MODE_FLAG_NVSYNC |DRM_MODE_FLAG_NHSYNC , + } +}; + +static const struct panel_desc neweast_wjfh116008a = { + .modes = neweast_wjfh116008a_modes, + .num_modes =2 , + .bpc =6 , + .size = { + .width =260 , + .height =150 , + }, + .delay = { + .prepare =110 , + .enable =20 , + .unprepare =500 , + }, + .bus_format =MEDIA_BUS_FMT_RGB666_1X18 , + .connector_type = DRM_MODE_CONNECTOR_eDP, +}; +static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = { .clock =9000 , .hdisplay =480 ,
@@ -3399,6 +3444,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "netron-dy,e231732", .data = &netron_dy_e231732, + }, { + .compatible = "neweast,wjfh116008a", + .data = &neweast_wjfh116008a, }, { .compatible = "newhaven,nhd-4.3-480272ef-atxl", .data = &newhaven_nhd_43_480272ef_atxl,
Signature · 1 line
2.25.0
PATCH v2 6/6 arm64: allwinner: a64: enable LCD-related hardware for Pinebook
In reply to Vasily KhoruzhickFrom: Icenowy Zheng <[email protected]>
Pinebook has an ANX6345 bridge connected to the RGB666 LCD output and eDP panel input. The bridge is controlled via I2C that's connected to R_I2C bus.
Enable all this hardware in device tree.
--- .../dts/allwinner/sun50i-a64-pinebook.dts | 61 ++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +60 -1
@@ -48,6 +48,18 @@ lid_switch { }; }; + panel_edp: panel-edp { + compatible = "neweast,wjfh116008a"; + backlight = <&backlight>; + power-supply = <®_dc1sw>; + + port { + panel_edp_in: endpoint { + remote-endpoint = <&anx6345_out_edp>; + }; + }; + }; + reg_vbklt: vbklt { compatible = "regulator-fixed"; regulator-name = "vbklt";
@@ -109,6 +121,10 @@ &dai { status = "okay"; }; +&de { + status = "okay"; +}; + &ehci0 { phys = <&usbphy 0>; phy-names = "usb";
@@ -119,6 +135,10 @@ &ehci1 { status = "okay"; }; +&mixer0 { + status = "okay"; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>;
@@ -177,12 +197,38 @@ &pwm { status = "okay"; }; -/* The ANX6345 eDP-bridge is on r_i2c */ &r_i2c { clock-frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&r_i2c_pl89_pins>; status = "okay"; + + anx6345: anx6345@38 { + compatible = "analogix,anx6345"; + reg = <0x38>; + reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ + dvdd25-supply = <®_dldo2>; + dvdd12-supply = <®_fldo1>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + anx6345_in: port@0 { + reg = <0>; + anx6345_in_tcon0: endpoint { + remote-endpoint = <&tcon0_out_anx6345>; + }; + }; + + anx6345_out: port@1 { + reg = <1>; + anx6345_out_edp: endpoint { + remote-endpoint = <&panel_edp_in>; + }; + }; + }; + }; }; &r_pio {
@@ -357,6 +403,19 @@ &sound { "MIC2", "Internal Microphone Right"; }; +&tcon0 { + pinctrl-names = "default"; + pinctrl-0 = <&lcd_rgb666_pins>; + + status = "okay"; +}; + +&tcon0_out { + tcon0_out_anx6345: endpoint { + remote-endpoint = <&anx6345_in_tcon0>; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>;
Signature · 1 line
2.25.0
Re: [PATCH v2 6/6] arm64: allwinner: a64: enable LCD-related hardware for Pinebook
Quoted 11 lines · Vasily Khoruzhick
From: Icenowy Zheng <[email protected]>
Pinebook has an ANX6345 bridge connected to the RGB666 LCD output and eDP panel input. The bridge is controlled via I2C that's connected to
R_I2Cbus.Enable all this hardware in device tree.
Reviewed-by Laurent Pinchart <[email protected]>Signed-off-by Icenowy Zheng <[email protected]>Signed-off-by Vasily Khoruzhick <[email protected]>
Applied the 6 patches, thanks!
Maxime