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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200729123444.5t5cv47umhwu7jnd@gilmour.lan>
Date:   Wed, 29 Jul 2020 14:34:44 +0200
From:   Maxime Ripard <maxime@...no.tech>
To:     Luca Weiss <luca@...tu.xyz>
Cc:     linux-arm-kernel@...ts.infradead.org,
        ~postmarketos/upstreaming@...ts.sr.ht,
        Rob Herring <robh+dt@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64: dts: sun50i-pinephone: add led flash

Hi!

On Sat, Jul 25, 2020 at 01:08:12PM +0200, Luca Weiss wrote:
> All revisions of the PinePhone have an SGM3140 LED flash. The gpios were
> swapped on v1.0 of the board but this was fixed in later revisions.
> 
> Signed-off-by: Luca Weiss <luca@...tu.xyz>
> ---
>  .../boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts   |  5 +++++
>  .../boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts   |  5 +++++
>  .../boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts   |  5 +++++
>  .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi      | 11 +++++++++++
>  4 files changed, 26 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
> index 0c42272106afa..b579b03d4e026 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
> @@ -9,3 +9,8 @@ / {
>  	model = "Pine64 PinePhone Developer Batch (1.0)";
>  	compatible = "pine64,pinephone-1.0", "allwinner,sun50i-a64";
>  };
> +
> +&sgm3140 {
> +	flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
> +	enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
> +};
> 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 3e99a87e9ce52..8552587aac248 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
> @@ -28,3 +28,8 @@ &backlight {
>  	num-interpolated-steps = <50>;
>  	default-brightness-level = <400>;
>  };
> +
> +&sgm3140 {
> +	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
> +	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
> +};
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
> index a9f5b670c9b82..ec77715ba4a2a 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
> @@ -38,3 +38,8 @@ &lis3mdl {
>  	interrupt-parent = <&pio>;
>  	interrupts = <1 1 IRQ_TYPE_EDGE_RISING>; /* PB1 */
>  };
> +
> +&sgm3140 {
> +	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
> +	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
> +};
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> index 25150aba749dc..e0bc1bcc1c1f3 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> @@ -60,6 +60,17 @@ vibrator {
>  		enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
>  		vcc-supply = <&reg_dcdc1>;
>  	};
> +
> +	sgm3140: led-controller {

The nodes should be ordered by node-name here

> +		compatible = "sgmicro,sgm3140";
> +		vin-supply = <&reg_dcdc1>;
> +
> +		sgm3140_flash: led {

What do you need the label for?

Thanks!
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