summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
AgeCommit message (Collapse)Author
2024-11-10arm64: dts: allwinner: pinephone: Add mount matrix to accelerometerDragan Simic
The way InvenSense MPU-6050 accelerometer is mounted on the user-facing side of the Pine64 PinePhone mainboard, which makes it rotated 90 degrees counter- clockwise, [1] requires the accelerometer's x- and y-axis to be swapped, and the direction of the accelerometer's y-axis to be inverted. Rectify this by adding a mount-matrix to the accelerometer definition in the Pine64 PinePhone dtsi file. [1] https://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20bottom%20placement%20v1.1%2020191031.pdf Fixes: 91f480d40942 ("arm64: dts: allwinner: Add initial support for Pine64 PinePhone") Cc: stable@vger.kernel.org Suggested-by: Ondrej Jirman <megi@xff.cz> Suggested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Signed-off-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Link: https://patch.msgid.link/129f0c754d071cca1db5d207d9d4a7bd9831dff7.1726773282.git.dsimic@manjaro.org [wens@csie.org: Replaced Helped-by with Suggested-by] Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2024-11-07arm64: dts: sun50i-a64-pinephone: Add mount-matrix for PinePhone magnetometersShoji Keita
For lis3mdl, values are based on datasheet and PCB drawing and tested on a real device. For af8133j, values are from testing on a real device. Signed-off-by: Shoji Keita <awaittrot@shjk.jp> Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Link: https://patch.msgid.link/20240908214718.36316-3-andrej.skvortzov@gmail.com Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2024-11-07arm64: dts: sun50i-a64-pinephone: Add AF8133J to PinePhoneIcenowy Zheng
New batches of PinePhones switched the magnetometer to AF8133J from LIS3MDL because lack of ST components. Both chips use the same PB1 pin, but in different modes. LIS3MDL uses it as an gpio input to handle interrupt. AF8133J uses it as an gpio output as a reset signal. It wasn't possible at runtime to enable both device tree nodes and detect supported sensor at probe time, because both drivers try to acquire the same gpio in different modes. Device tree fixup will be done in firmware without introducing new board revision and new dts. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Link: https://patchwork.ozlabs.org/project/uboot/patch/20240211092824.395155-1-andrej.skvortzov@gmail.com/ Link: https://patch.msgid.link/20240908214718.36316-2-andrej.skvortzov@gmail.com Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2024-04-15arm64: dts: allwinner: pinephone: add multicolor LED nodeAren Moynihan
The red, green, and blue LEDs currently in the device tree represent a single RGB LED on the front of the PinePhone. Signed-off-by: Aren Moynihan <aren@peacevolution.org> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20240317004116.1473967-2-aren@peacevolution.org Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2024-04-15arm64: dts: allwinner: pinephone: Retain LEDs state in suspendMiles Alan
Allows user to set a LED before entering suspend to know that the phone is still on (or could be used for notifications etc). Signed-off-by: Miles Alan <m@milesalan.com> Signed-off-by: Ondrej Jirman <megi@xff.cz> Signed-off-by: Aren Moynihan <aren@peacevolution.org> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20240317004116.1473967-1-aren@peacevolution.org Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2021-11-15arm64: dts: allwinner: add 'chassis-type' propertyArnaud Ferraris
A new 'chassis-type' root node property has recently been approved for the device-tree specification, in order to provide a simple way for userspace to detect the device form factor and adjust their behavior accordingly. This patch fills in this property for end-user devices (such as laptops, smartphones and tablets) based on Allwinner ARM64 processors. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20211016102025.23346-2-arnaud.ferraris@collabora.com
2021-05-24arm64: dts: allwinner: pinephone: Set audio card nameArnaud Ferraris
Add the "PinePhone" name to the sound card: this will make upstreaming an ALSA UCM config easier as we can use a unique name. It also avoids an issue where the default card name is truncated. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> [Samuel: Split out change, updated commit message] Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20210430035859.3487-8-samuel@sholland.org
2021-05-11arm64: dts: allwinner: pinephone: Add support for Bluetooth audioSamuel Holland
The PinePhone has a Bluetooth chip with its PCM interface connected to AIF3. Add the DAI link so headeset audio can be routed in hardware. Even though the link is 16 bit PCM, configuring the link a 32-bit slot is required for compatibility with AIF2, which also uses a 32-bit slot, and which shares clock dividers with AIF3. Using equal clock frequencies allows the modem and headset to be used at the same time. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20210430035859.3487-7-samuel@sholland.org
2021-03-06arm64: dts: allwinner: Use the new r_intc bindingSamuel Holland
The binding of R_INTC was updated to allow specifying interrupts other than the external NMI, since routing those interrupts through the R_INTC driver allows using them for wakeup. Update the device trees to use the new binding. Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2021-01-31arm64: dts: allwinner: pinephone: Remove useless light sensor suppliesMaxime Ripard
The stk3311 binding don't expect a vdd or leda power supplies. Remove them. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Jernej Skrabec <jernej.skrabec@siol.net> Link: https://lore.kernel.org/r/20210114113538.1233933-17-maxime@cerno.tech
2021-01-18ARM: dts: sunxi: Add missing backlight supplyMaxime Ripard
The pwm-backlight binding requires a power supply. Make sure we provide one. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Jernej Skrabec <jernej.skrabec@siol.net> Link: https://lore.kernel.org/r/20210114113538.1233933-7-maxime@cerno.tech
2021-01-18ARM: dts: sunxi: Fix the LED node namesMaxime Ripard
According to the LED bindings, the LED node names are supposed to be led plus an optional suffix. Let's fix our users to use that new scheme. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20210114113538.1233933-6-maxime@cerno.tech
2021-01-13arm64: dts: allwinner: pinephone: Support volume key wakeupSamuel Holland
PinePhone volume keys are connected to the LRADC in the A64. Users may want to use them to wake the device from sleep. Support this by declaring the LRADC as a wakeup source. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20210113040542.34247-4-samuel@sholland.org
2020-11-06arm64: dts: allwinner: pinephone: Use generic sensor node namesSamuel Holland
Instead of duplicating part of the compatible string in the node name, use generic names as recommended by (and listed in) section 2.2.2 of the Devicetree Specification. Suggested-by: Maxime Ripard <maxime@cerno.tech> Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20201106032055.51530-1-samuel@sholland.org
2020-11-05arm64: dts: allwinner: pinephone: Add Bluetooth supportOndrej Jirman
The PinePhone has a Realtek rtl8723cs Bluetooth controller. Signed-off-by: Ondrej Jirman <megous@megous.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20201105054135.24860-7-samuel@sholland.org
2020-11-05arm64: dts: allwinner: pinephone: Add WiFi supportOndrej Jirman
The PinePhone has a Realtek rtl8723cs WiFi module. On mainboard revisions 1.0 and 1.1, the reset input is always pulled high, so no power sequence is needed. On mainboard revision 1.2, the reset input is connected to PL2. Signed-off-by: Ondrej Jirman <megous@megous.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20201105054135.24860-6-samuel@sholland.org
2020-11-05arm64: dts: allwinner: pinephone: Add light/proximity sensorOndrej Jirman
Pinephone has STK3311-X proximity sensor. Add support for it. Signed-off-by: Ondrej Jirman <megous@megous.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20201105054135.24860-5-samuel@sholland.org
2020-11-05arm64: dts: allwinner: pinephone: Add LED flashLuca Weiss
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@z3ntu.xyz> Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20201105054135.24860-4-samuel@sholland.org
2020-11-05arm64: dts: allwinner: pinephone: Set ALDO3 to exactly 3v0Samuel Holland
ALDO3 is used as the power supply for the LRADC keys voltage divider, in addition to supplying AVCC and VCC-PLL. While AVCC and VCC-PLL will accept any voltage between 2v7 and 3v3, LRADC needs a precise 3v0 input to maintain the expected 2:3 ratio between the internal 2v0 reference voltage and the external supply. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20201105054135.24860-3-samuel@sholland.org
2020-11-05arm64: dts: allwinner: pinephone: Remove AC power supplySamuel Holland
The AXP803 in the Pinephone has its ACIN and VBUS pins shorted together. In this configuration, the VBUS control registers take priority over the ACIN control registers, which means the ACIN sysfs knobs have no effect. Remove the AC power supply from the DTS, since VBUS is really the only power supply. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20201105054135.24860-2-samuel@sholland.org
2020-09-17arm64: dts: allwinner: a64: Update codec widget namesSamuel Holland
The sun8i-codec driver introduced a new set of DAPM widgets that more accurately describe the hardware topology. Update the various device trees to use the new widget names. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20200726012557.38282-7-samuel@sholland.org
2020-07-06arm64: dts: sun50i-pinephone: dldo4 must not be >= 1.8VOndrej Jirman
Some outputs from the RTL8723CS are connected to the PL port (BT_WAKE_AP), which runs at 1.8V. When BT_WAKE_AP is high, the PL pin this signal is connected to is overdriven, and the whole PL port's voltage rises somewhat. This results in changing voltage on the R_PWM pin (PL10), which is the cause for backlight flickering very noticeably when typing on a Bluetooth keyboard, because backlight intensity is highly sensitive to the voltage of the R_PWM pin. Limit the maximum WiFi/BT I/O voltage to 1.8V to avoid overdriving the PL port pins via BT and WiFi IO port signals. WiFi and BT functionality is unaffected by this change. This completely stops the backlight flicker when using bluetooth. Fixes: 91f480d40942 ("arm64: dts: allwinner: Add initial support for Pine64 PinePhone") Signed-off-by: Ondrej Jirman <megous@megous.com> Link: https://lore.kernel.org/r/20200703194842.111845-4-megous@megous.com Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-07-06arm64: dts: allwinner: Add support for PinePhone revision 1.2Ondrej Jirman
Revision 1.2 should be the final production version of the PinePhone. It has most of the known HW quirks fixed. Interrupt to the magnetometer is routed correctly, in this revision. The bulk of the changes are in how modem and the USB-C HDMI bridge chip is powered and where the signals from the modem are connected. Also backlight intensity seemingly behaves differently, than on the 1.1 and 1.0 boards, and the PWM duty cycle where backlight starts to work is 10% (as tested on 2 1.2 PinePhones I have access to). Signed-off-by: Ondrej Jirman <megous@megous.com> Link: https://lore.kernel.org/r/20200703194842.111845-3-megous@megous.com Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-07-03arm64: dts: sun50i-a64-pinephone: Add touchscreen supportOndrej Jirman
Pinephone has a Goodix GT917S capacitive touchscreen controller on I2C0 bus. Add support for it. Signed-off-by: Ondrej Jirman <megous@megous.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200702081432.1727696-3-megous@megous.com [Maxime: Removed the redundant pinctrl nodes] Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-07-03arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhoneIcenowy Zheng
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@aosc.io> Signed-off-by: Martijn Braam <martijn@brixit.nl> Signed-off-by: Ondrej Jirman <megous@megous.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200702081432.1727696-2-megous@megous.com Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-02-27arm64: dts: allwinner: Add initial support for Pine64 PinePhoneOndrej Jirman
At the moment PinePhone comes in two slightly incompatible variants: - 1.0: Early Developer Batch - 1.1: Braveheart Batch There will be at least one more incompatible variant in the very near future, so let's start by sharing the dtsi among multiple variants, right away, even though the HW description doesn't yet include the different bits. The differences between 1.0 and 1.1 are: change in pins that control the flash LED, differences in modem power status signal routing, and maybe some other subtler things, that have not been determined yet. This is a basic DT that includes only features that are already supported by mainline drivers. Co-developed-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Samuel Holland <samuel@sholland.org> Co-developed-by: Martijn Braam <martijn@brixit.nl> Signed-off-by: Martijn Braam <martijn@brixit.nl> Co-developed-by: Luca Weiss <luca@z3ntu.xyz> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Signed-off-by: Bhushan Shah <bshah@kde.org> Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Ondrej Jirman <megous@megous.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech>