xref: /openbmc/linux/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts (revision d0034a7a4ac7fae708146ac0059b9c47a1543f0d)
1e53568caSOndrej Jirman// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2e53568caSOndrej Jirman// Copyright (C) 2020 Ondrej Jirman <megous@megous.com>
3e53568caSOndrej Jirman
4e53568caSOndrej Jirman/dts-v1/;
5e53568caSOndrej Jirman
6e53568caSOndrej Jirman#include "sun50i-a64-pinephone.dtsi"
7e53568caSOndrej Jirman
8e53568caSOndrej Jirman/ {
9e53568caSOndrej Jirman	model = "Pine64 PinePhone (1.2)";
10*536f74a8SDylan Van Assche	compatible = "pine64,pinephone-1.2", "pine64,pinephone", "allwinner,sun50i-a64";
114fcf6f34SOndrej Jirman
124fcf6f34SOndrej Jirman	wifi_pwrseq: wifi-pwrseq {
134fcf6f34SOndrej Jirman		compatible = "mmc-pwrseq-simple";
144fcf6f34SOndrej Jirman		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
154fcf6f34SOndrej Jirman	};
16e53568caSOndrej Jirman};
17e53568caSOndrej Jirman
18e53568caSOndrej Jirman&backlight {
19e53568caSOndrej Jirman	power-supply = <&reg_ldo_io0>;
20e53568caSOndrej Jirman	/*
21e53568caSOndrej Jirman	 * PWM backlight circuit on this PinePhone revision was changed since 1.0,
22e53568caSOndrej Jirman	 * and the lowest PWM duty cycle that doesn't lead to backlight being off
23e53568caSOndrej Jirman	 * is around 10%. Duty cycle for the lowest brightness level also varries
24e53568caSOndrej Jirman	 * quite a bit between individual boards, so the lowest value here was
25e53568caSOndrej Jirman	 * chosen as a safe default.
26e53568caSOndrej Jirman	 */
27e53568caSOndrej Jirman	brightness-levels = <
28e53568caSOndrej Jirman		5000 5248 5506 5858 6345
29e53568caSOndrej Jirman		6987 7805 8823 10062 11543
30e53568caSOndrej Jirman		13287 15317 17654 20319 23336
31e53568caSOndrej Jirman		26724 30505 34702 39335 44427
32e53568caSOndrej Jirman		50000
33e53568caSOndrej Jirman	>;
34e53568caSOndrej Jirman	num-interpolated-steps = <50>;
35e53568caSOndrej Jirman	default-brightness-level = <500>;
36e53568caSOndrej Jirman};
37e53568caSOndrej Jirman
38e53568caSOndrej Jirman&lis3mdl {
39e53568caSOndrej Jirman	/*
40e53568caSOndrej Jirman	 * Board revision 1.2 fixed routing of the interrupt to DRDY pin,
41e53568caSOndrej Jirman	 * enable interrupts.
42e53568caSOndrej Jirman	 */
43e53568caSOndrej Jirman	interrupt-parent = <&pio>;
44e53568caSOndrej Jirman	interrupts = <1 1 IRQ_TYPE_EDGE_RISING>; /* PB1 */
45e53568caSOndrej Jirman};
46085d96b8SLuca Weiss
474fcf6f34SOndrej Jirman&mmc1 {
484fcf6f34SOndrej Jirman	mmc-pwrseq = <&wifi_pwrseq>;
494fcf6f34SOndrej Jirman};
504fcf6f34SOndrej Jirman
51085d96b8SLuca Weiss&sgm3140 {
52085d96b8SLuca Weiss	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
53085d96b8SLuca Weiss	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
54085d96b8SLuca Weiss};
55