lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 2 Jul 2020 09:46:31 +0200
From:   Maxime Ripard <maxime@...no.tech>
To:     Ondrej Jirman <megous@...ous.com>
Cc:     linux-sunxi@...glegroups.com,
        Thierry Reding <thierry.reding@...il.com>,
        Sam Ravnborg <sam@...nborg.org>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Guido Günther <agx@...xcpu.org>,
        Purism Kernel Team <kernel@...i.sm>,
        Rob Herring <robh+dt@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Icenowy Zheng <icenowy@...c.io>,
        dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Samuel Holland <samuel@...lland.org>,
        Martijn Braam <martijn@...xit.nl>, Luca Weiss <luca@...tu.xyz>,
        Bhushan Shah <bshah@....org>
Subject: Re: [PATCH v7 12/13] arm64: dts: sun50i-a64-pinephone: Enable LCD
 support on PinePhone

On Wed, Jul 01, 2020 at 06:29:27PM +0200, Ondrej Jirman wrote:
> From: Icenowy Zheng <icenowy@...c.io>
> 
> PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for
> display.
> 
> Backlight levels curve was optimized by Martijn Braam using a
> lux meter.
> 
> Add its device nodes.
> 
> Signed-off-by: Icenowy Zheng <icenowy@...c.io>
> Signed-off-by: Martijn Braam <martijn@...xit.nl>
> Signed-off-by: Ondrej Jirman <megous@...ous.com>
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> ---
>  .../allwinner/sun50i-a64-pinephone-1.1.dts    | 19 ++++++++++
>  .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 35 +++++++++++++++++++
>  2 files changed, 54 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
> index 06a775c41664..3e99a87e9ce5 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
> @@ -9,3 +9,22 @@ / {
>  	model = "Pine64 PinePhone Braveheart (1.1)";
>  	compatible = "pine64,pinephone-1.1", "allwinner,sun50i-a64";
>  };
> +
> +&backlight {
> +	power-supply = <&reg_ldo_io0>;
> +	/*
> +	 * PWM backlight circuit on this PinePhone revision was changed since
> +	 * 1.0, and the lowest PWM duty cycle that doesn't lead to backlight
> +	 * being off is around 20%. Duty cycle for the lowest brightness level
> +	 * also varries quite a bit between individual boards, so the lowest
> +	 * value here was chosen as a safe default.
> +	 */
> +	brightness-levels = <
> +		774  793  814  842
> +		882  935  1003 1088
> +		1192 1316 1462 1633
> +		1830 2054 2309 2596
> +		2916 3271 3664 4096>;
> +	num-interpolated-steps = <50>;
> +	default-brightness-level = <400>;
> +};
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> index cefda145c3c9..85a7aa5efd32 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> @@ -16,6 +16,13 @@ aliases {
>  		serial0 = &uart0;
>  	};
>  
> +	backlight: backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
> +		enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
> +		/* Backlight configuration differs per PinePhone revision. */
> +	};
> +
>  	chosen {
>  		stdout-path = "serial0:115200n8";
>  	};
> @@ -84,6 +91,30 @@ &dai {
>  	status = "okay";
>  };
>  
> +&de {
> +	status = "okay";
> +};
> +
> +&dphy {
> +	status = "okay";
> +};
> +
> +&dsi {
> +	vcc-dsi-supply = <&reg_dldo1>;
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	status = "okay";

If you're about to send a new version, you can remove #address-cells and
#size-cells too, they're already set in the DTSI.

Maxime

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ