[linux-sunxi] [PATCH v3 7/8] power: supply: axp20x_usb_power: Add wakeup control

2020-01-12 Thread Samuel Holland
on the PMIC are all disabled. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 83 - 1 file changed, 67 insertions(+), 16 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply

[linux-sunxi] [PATCH v3 2/8] power: supply: axp20x_ac_power: Allow offlining

2020-01-12 Thread Samuel Holland
AXP803/AXP813 have a flag that enables/disables the AC power supply input. Allow control of this flag via the ONLINE property on those variants. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_ac_power.c | 9 - 1 file changed, 8 insertions(+), 1

[linux-sunxi] [PATCH v3 1/8] power: supply: axp20x_ac_power: Fix reporting online status

2020-01-12 Thread Samuel Holland
this flag into account when getting the ONLINE property of the AC input, on PMICs where this flag is present. Fixes: 7693b5643fd2 ("power: supply: add AC power supply driver for AXP813") Cc: sta...@vger.kernel.org Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_ac_po

[linux-sunxi] [PATCH v3 0/8] X-Powers Power Supply Improvements

2020-01-12 Thread Samuel Holland
ate changed during suspend (9) Samuel Holland (8): power: supply: axp20x_ac_power: Fix reporting online status power: supply: axp20x_ac_power: Allow offlining power: supply: axp20x_ac_power: Add wakeup control power: supply: axp20x_usb_power: Remove unused device_node power: sup

[linux-sunxi] [PATCH v3 3/8] power: supply: axp20x_ac_power: Add wakeup control

2020-01-12 Thread Samuel Holland
on the PMIC are all disabled. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_ac_power.c | 91 +- 1 file changed, 74 insertions(+), 17 deletions(-) diff --git a/drivers/power/supply/axp20x_ac_power.c b/drivers/power/supply

[linux-sunxi] [PATCH v3 5/8] power: supply: axp20x_usb_power: Use a match structure

2020-01-12 Thread Samuel Holland
(). Other parts of the driver still do ID matching; they are left unchanged for now. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 86 - 1 file changed, 57 insertions(+), 29 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b

[linux-sunxi] [PATCH 2/3] Input: axp20x-pek - Respect userspace wakeup configuration

2020-01-12 Thread Samuel Holland
interrupt handler. The device core ignores such interrupts, so to actually disable wakeup, we must explicitly disable all non-wakeup interrupts during suspend. Signed-off-by: Samuel Holland --- drivers/input/misc/axp20x-pek.c | 42 - 1 file changed, 41 insertions

[linux-sunxi] [PATCH 1/3] Input: axp20x-pek - Remove unique wakeup event handling

2020-01-12 Thread Samuel Holland
then it would race with the power key IRQ handler. So the best solution seems to be simply removing the hook. Signed-off-by: Samuel Holland --- drivers/input/misc/axp20x-pek.c | 25 - 1 file changed, 25 deletions(-) diff --git a/drivers/input/misc/axp20x-pek.c b/drivers

[linux-sunxi] [PATCH 3/3] Input: axp20x-pek - Enable wakeup for all AXP variants

2020-01-12 Thread Samuel Holland
There are many devices, including several mobile battery-powered devices, using other AXP variants as their PMIC. Enable them to use the power key as a wakeup source. Signed-off-by: Samuel Holland --- drivers/input/misc/axp20x-pek.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[linux-sunxi] [PATCH 4/9] ARM: dts: sunxi: h3/h5: Add r_intc node

2020-01-12 Thread Samuel Holland
The H3 and H5 SoCs have an additional interrupt controller in the RTC power domain that can be used to enable wakeup for certain IRQs. Add a node for it. Signed-off-by: Samuel Holland --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm

[linux-sunxi] [PATCH 5/9] ARM: dts: sunxi: h3/h5: Move wakeup-capable IRQs to r_intc

2020-01-12 Thread Samuel Holland
All IRQs that can be used to wake up the system must be routed through r_intc, so they are visible to firmware while the system is suspended. r_intc IRQ numbers are offset by 32 from the GIC IRQ numbers. Signed-off-by: Samuel Holland --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 11 +++ 1

[linux-sunxi] [PATCH 1/9] irqchip/sun6i-r: Switch to a stacked irqchip driver

2020-01-12 Thread Samuel Holland
. The "interrupt" property of the R_INTC node is used to determine 1) the offset between GIC and R_INTC hwirq numbers and 2) the type of trigger between the R_INTC "IRQ 0 pending" output and the GIC NMI input. This commit mostly reverts commit 173bda53b340 ("irqchip/sunxi-n

[linux-sunxi] [PATCH 2/9] irqchip/sun6i-r: Add wakeup support

2020-01-12 Thread Samuel Holland
for an interrupt to arrive. Signed-off-by: Samuel Holland --- drivers/irqchip/irq-sun6i-r.c | 53 +++ 1 file changed, 53 insertions(+) diff --git a/drivers/irqchip/irq-sun6i-r.c b/drivers/irqchip/irq-sun6i-r.c index 37b6e9c60bf8..f4a4e335061b 100644 --- a/drivers/irqchip

[linux-sunxi] [PATCH 3/9] dt-bindings: irq: Add a compatible for the H3 R_INTC

2020-01-12 Thread Samuel Holland
difference. Signed-off-by: Samuel Holland --- .../interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml b/Documentation/devicetree/bindings/interrupt

[linux-sunxi] [PATCH 0/9] sunxi: Support IRQ wakeup from deep sleep

2020-01-12 Thread Samuel Holland
atches update the DT+bindings to use R_INTC where beneficial With appropriate firmware, this series allows waking from RTC and NMI (power button, plugging in USB, etc.). Wake from Port L GPIO interrupts (gpio-keys, wifi, etc.) requires some patches to the pinctrl driver. Samuel Holland (9): i

[linux-sunxi] [PATCH 6/9] ARM: dts: sunxi: a83t: Move wakeup-capable IRQs to r_intc

2020-01-12 Thread Samuel Holland
All IRQs that can be used to wake up the system must be routed through r_intc, so they are visible to firmware while the system is suspended. r_intc IRQ numbers are offset by 32 from the GIC IRQ numbers. Signed-off-by: Samuel Holland --- arch/arm/boot/dts/sun8i-a83t.dtsi | 9 ++--- 1 file

[linux-sunxi] [PATCH 8/9] arm64: dts: allwinner: h6: Fix indentation of IR node

2020-01-12 Thread Samuel Holland
This node was indented by two tabs when added instead of one. Remove the extra tab. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 ++-- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6

[linux-sunxi] [PATCH 9/9] arm64: dts: allwinner: Move wakeup-capable IRQs to r_intc

2020-01-12 Thread Samuel Holland
All IRQs that can be used to wake up the system must be routed through r_intc, so they are visible to firmware while the system is suspended. r_intc IRQ numbers are offset by 96 from the GIC IRQ numbers. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 13

[linux-sunxi] [PATCH 7/9] arm64: dts: allwinner: a64: Move wakeup-capable IRQs to r_intc

2020-01-12 Thread Samuel Holland
All IRQs that can be used to wake up the system must be routed through r_intc, so they are visible to firmware while the system is suspended. r_intc IRQ numbers are offset by 32 from the GIC IRQ numbers. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 11

[linux-sunxi] [PATCH v6 3/6] ARM: dts: sunxi: a83t: Add msgbox node

2020-01-12 Thread Samuel Holland
The A83T SoC contains a message box that can be used to send messages and interrupts back and forth between the ARM application CPUs and the ARISC coprocessor. Add a device tree node for it. Tested-by: Ondrej Jirman Signed-off-by: Samuel Holland --- arch/arm/boot/dts/sun8i-a83t.dtsi | 10

[linux-sunxi] [PATCH v6 0/6] Allwinner sun6i message box support

2020-01-12 Thread Samuel Holland
s for SoCs that document the message box Samuel Holland (6): dt-bindings: mailbox: Add a sun6i message box binding mailbox: sun6i-msgbox: Add a new mailbox driver ARM: dts: sunxi: a83t: Add msgbox node ARM: dts: sunxi: h3/h5: Add msgbox node arm64: dts: allwinner: a64: Add msgbox node arm64: dts:

[linux-sunxi] [PATCH v6 6/6] arm64: dts: allwinner: h6: Add msgbox node

2020-01-12 Thread Samuel Holland
The H6 SoC contains a message box that can be used to send messages and interrupts back and forth between the ARM application CPUs and the ARISC coprocessor. Add a device tree node for it. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 ++ 1 file

[linux-sunxi] [PATCH v6 4/6] ARM: dts: sunxi: h3/h5: Add msgbox node

2020-01-12 Thread Samuel Holland
The H3 and H5 SoCs contain a message box that can be used to send messages and interrupts back and forth between the ARM application CPUs and the ARISC coprocessor. Add a device tree node for it. Signed-off-by: Samuel Holland --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 10 ++ 1 file

[linux-sunxi] [PATCH v6 2/6] mailbox: sun6i-msgbox: Add a new mailbox driver

2020-01-12 Thread Samuel Holland
. Signed-off-by: Samuel Holland --- drivers/mailbox/Kconfig| 9 + drivers/mailbox/Makefile | 2 + drivers/mailbox/sun6i-msgbox.c | 332 + 3 files changed, 343 insertions(+) create mode 100644 drivers/mailbox/sun6i-msgbox.c diff --git a/drivers

[linux-sunxi] [PATCH v6 1/6] dt-bindings: mailbox: Add a sun6i message box binding

2020-01-12 Thread Samuel Holland
This mailbox hardware is present in Allwinner sun6i, sun8i, sun9i, and sun50i SoCs. Add a device tree binding for it. Signed-off-by: Samuel Holland --- .../mailbox/allwinner,sun6i-a31-msgbox.yaml | 80 +++ 1 file changed, 80 insertions(+) create mode 100644 Documentation

[linux-sunxi] [PATCH v6 5/6] arm64: dts: allwinner: a64: Add msgbox node

2020-01-12 Thread Samuel Holland
The A64 SoC contains a message box that can be used to send messages and interrupts back and forth between the ARM application CPUs and the ARISC coprocessor. Add a device tree node for it. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 10 ++ 1 file

Re: [linux-sunxi] Re: [PATCH 1/3] Input: axp20x-pek - Remove unique wakeup event handling

2020-01-14 Thread Samuel Holland
Hans, Thank you for the detailed explanation! This is exactly the background I needed, and it clears up my confusion. On 1/13/20 4:58 AM, Hans de Goede wrote: > On 13-01-2020 11:41, Hans de Goede wrote: >> Hi, >> >> On 13-01-2020 04:20, Samuel Holland wrote: >>>

[linux-sunxi] [PATCH v2 1/2] Input: axp20x-pek - Respect userspace wakeup configuration

2020-01-14 Thread Samuel Holland
interrupt handler. The device core ignores such interrupts, so to actually disable wakeup, we must explicitly disable all non-wakeup interrupts during suspend. Signed-off-by: Samuel Holland --- drivers/input/misc/axp20x-pek.c | 37 - 1 file changed, 36 insertions

[linux-sunxi] [PATCH v2 0/2] Input: axp20x-pek wakeup enablement

2020-01-14 Thread Samuel Holland
ifdef CONFIG_PM_SLEEP" [patch 2] - Add Reviewed-by [patch 3] Samuel Holland (2): Input: axp20x-pek - Respect userspace wakeup configuration Input: axp20x-pek - Enable wakeup for all AXP variants drivers/input/misc/axp20x-pek.c | 38 +++-- 1 file changed, 36

[linux-sunxi] [PATCH v2 2/2] Input: axp20x-pek - Enable wakeup for all AXP variants

2020-01-14 Thread Samuel Holland
There are many devices, including several mobile battery-powered devices, using other AXP variants as their PMIC. Allow them to use the power key as a wakeup source. Reviewed-by: Hans de Goede Signed-off-by: Samuel Holland --- drivers/input/misc/axp20x-pek.c | 3 +-- 1 file changed, 1

[linux-sunxi] Re: [PATCH 3/3] Input: axp20x-pek - Enable wakeup for all AXP variants

2020-01-14 Thread Samuel Holland
Hi, On 1/14/20 3:07 AM, Hans de Goede wrote: > Hi, > > On 13-01-2020 22:26, Dmitry Torokhov wrote: >> Hi Samuel, >> >> On Sun, Jan 12, 2020 at 09:20:32PM -0600, Samuel Holland wrote: >>> There are many devices, including several mobile battery-powered &

[linux-sunxi] [PATCH 1/2] pinctrl: sunxi: Forward calls to irq_set_irq_wake

2020-01-17 Thread Samuel Holland
already manages the "wake_depth" of each IRQ, no additional accounting is needed in the pinctrl driver. Signed-off-by: Samuel Holland --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/sun

[linux-sunxi] [PATCH 2/2] pinctrl: sunxi: Mask non-wakeup IRQs on suspend

2020-01-17 Thread Samuel Holland
The pin controller hardware does not distinguish IRQs intended for wakeup from other IRQs, so we must mask non-wakeup IRQs in software to prevent inadvertent wakeups. This is accomplished at the irqchip level via the IRQCHIP_MASK_ON_SUSPEND flag. Signed-off-by: Samuel Holland --- drivers

[linux-sunxi] [PATCH 8/9] arm64: dts: allwinner: pinebook: Fix backlight regulator

2020-01-19 Thread Samuel Holland
h are both >3.3V, the output could not be 3.3V anyway. Signed-off-by: Samuel Holland --- .../dts/allwinner/sun50i-a64-pinebook.dts | 20 +-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/

[linux-sunxi] [PATCH 6/9] arm64: dts: allwinner: pinebook: Document MMC0 CD pin name

2020-01-19 Thread Samuel Holland
Normally GPIO pin references are followed by a comment giving the pin name for searchability. Add the comment here where it was missing. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[linux-sunxi] [PATCH 9/9] arm64: dts: allwinner: pinebook: Fix 5v0 boost regulator

2020-01-19 Thread Samuel Holland
Now that AXP803 GPIO support is available, we can properly model the hardware. Replace the use of GPIO0-LDO with a fixed regulator controlled by GPIO0. This boost regulator is used to power the (internal and external) USB ports, as well as the speakers. Signed-off-by: Samuel Holland --- .../dts

[linux-sunxi] [PATCH 7/9] arm64: dts: allwinner: pinebook: Add GPIO port regulators

2020-01-19 Thread Samuel Holland
Allwinner A64 SoC has separate supplies for PC, PD, PE, PG and PL. VCC-PC and VCC-PG are supplied by ELDO1 at 1.8v. VCC-PD is supplied by DCDC1 (VCC-IO) at 3.3v. VCC-PE is supplied by ALDO1, and is unused. VCC-PL creates a circular dependency, so it is omitted for now. Signed-off-by: Samuel

[linux-sunxi] [PATCH 1/9] arm64: dts: allwinner: Enable button wakeup on Orange Pi PC2

2020-01-19 Thread Samuel Holland
The Orange Pi PC2 features a GPIO button. As the button is connected to Port L (pin PL3), it can be used as a wakeup source. Enable this. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64

[linux-sunxi] [PATCH 3/9] arm64: dts: allwinner: pinebook: Remove unused AXP803 regulators

2020-01-19 Thread Samuel Holland
The Pinebook does not use the CSI bus on the A64. In fact it does not use GPIO port E for anything at all. Thus the following regulators are not used and do not need voltages set: - ALDO1: Connected to VCC-PE only - DLDO3: Not connected - ELDO3: Not connected Signed-off-by: Samuel Holland

[linux-sunxi] [PATCH 2/9] arm64: dts: allwinner: pinebook: Remove unused vcc3v3 regulator

2020-01-19 Thread Samuel Holland
This fixed regulator has no consumers, GPIOs, or other connections. Remove it. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64

[linux-sunxi] [PATCH 5/9] arm64: dts: allwinner: pinebook: Make simplefb more consistent

2020-01-19 Thread Samuel Holland
Boards generally reference the simplefb nodes from the SoC dtsi by label, not by full path. simplefb_hdmi is already like this in the Pinebook DTS. Update simplefb_lcd to match. Signed-off-by: Samuel Holland --- .../arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 12 ++-- 1 file

[linux-sunxi] [PATCH 4/9] arm64: dts: allwinner: pinebook: Sort device tree nodes

2020-01-19 Thread Samuel Holland
The r_i2c node should come before r_rsb, and in any case should not separate the axp803 node from its subnodes. Signed-off-by: Samuel Holland --- .../boot/dts/allwinner/sun50i-a64-pinebook.dts | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot

[linux-sunxi] [PATCH v4 0/4] X-Powers Power Supply Improvements

2020-01-14 Thread Samuel Holland
to regmap_update_bits (3, 7) - Use #ifdef instead of #if to avoid -Wundef warnings (4, 8) - Poll once after an IRQ, instead of setting power->online in the IRQ (9) - Poll once on resume, in case the state changed during suspend (9) Samuel Holland (4): power: supply: axp20x_usb_power: Use a match struct

[linux-sunxi] [PATCH v4 3/4] power: supply: axp20x_usb_power: Add wakeup control

2020-01-14 Thread Samuel Holland
on the PMIC are all disabled. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 83 - 1 file changed, 67 insertions(+), 16 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply

[linux-sunxi] [PATCH v4 1/4] power: supply: axp20x_usb_power: Use a match structure

2020-01-14 Thread Samuel Holland
(). Other parts of the driver still do ID matching; they are left unchanged for now. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 86 - 1 file changed, 57 insertions(+), 29 deletions(-) diff --git a/drivers/power/supply

[linux-sunxi] [PATCH v4 2/4] power: supply: axp20x_usb_power: Allow offlining

2020-01-14 Thread Samuel Holland
VBUS input is disabled via the PATH_SEL bit, the VBUS_USED bit in PWR_INPUT_STATUS is cleared, so there is no change needed when getting the property. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 30 + 1 file

[linux-sunxi] [PATCH v4 4/4] power: supply: axp20x_usb_power: Only poll while offline

2020-01-14 Thread Samuel Holland
olling will cease until the next VBUS_REMOVAL IRQ. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 30 + 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers

[linux-sunxi] Re: [PATCH 3/9] arm64: dts: allwinner: pinebook: Remove unused AXP803 regulators

2020-01-21 Thread Samuel Holland
On 1/21/20 3:05 AM, Maxime Ripard wrote: > On Sun, Jan 19, 2020 at 10:30:58AM -0600, Samuel Holland wrote: >> The Pinebook does not use the CSI bus on the A64. In fact it does not >> use GPIO port E for anything at all. Thus the following regulators are >> not used and do

Re: [linux-sunxi] Re: [PATCH 9/9] arm64: dts: allwinner: Move wakeup-capable IRQs to r_intc

2020-01-13 Thread Samuel Holland
Hello, On 1/13/20 11:30 AM, pune wrote: > I am using Banana bi bsp for android which in turn using lichee kernel 3.10 Unfortunately, this is the reason you are not getting much help. The BSP kernel works very differently from mainline Linux, especially with regard to power management. Allwinner

[linux-sunxi] [PATCH 3/7] power: supply: axp20x_usb_power: Remove unused device_node

2020-01-01 Thread Samuel Holland
This member of struct axp20x_usb_power is not used anywhere. Remove it. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index

[linux-sunxi] [PATCH 2/7] power: supply: axp20x_ac_power: Add wakeup control

2020-01-01 Thread Samuel Holland
on the PMIC are all disabled. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_ac_power.c | 103 +++-- 1 file changed, 80 insertions(+), 23 deletions(-) diff --git a/drivers/power/supply/axp20x_ac_power.c b/drivers/power/supply/axp20x_ac_power.c index 4410e7b89383

[linux-sunxi] [PATCH 1/7] power: supply: axp20x_ac_power: Allow offlining

2020-01-01 Thread Samuel Holland
AXP803/AXP813 have a flag that enables/disables the AC power supply input. Allow control of this flag via the ONLINE property on those variants. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_ac_power.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

[linux-sunxi] [PATCH 7/7] power: supply: axp20x_usb_power: Only poll while offline

2020-01-01 Thread Samuel Holland
ent transition necessarily implies an online->offline transition. This will cause an IRQ, and so there is no need to poll. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 35 ++--- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers

[linux-sunxi] [PATCH 5/7] power: supply: axp20x_usb_power: Allow offlining

2020-01-01 Thread Samuel Holland
-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index 2d7272e19a87..f49c8ff4a3f0 100644 --- a/drivers/power/supply

[linux-sunxi] Re: [PATCH 1/7] power: supply: axp20x_ac_power: Allow offlining

2020-01-01 Thread Samuel Holland
On 1/2/20 12:36 AM, Samuel Holland wrote: > AXP803/AXP813 have a flag that enables/disables the AC power supply > input. Allow control of this flag via the ONLINE property on those > variants. > > Signed-off-by: Samuel Holland > --- > drivers/power/supply/axp20x_ac_power.c

[linux-sunxi] [PATCH 6/7] power: supply: axp20x_usb_power: Add wakeup control

2020-01-01 Thread Samuel Holland
on the PMIC are all disabled. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 80 - 1 file changed, 65 insertions(+), 15 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index

[linux-sunxi] [PATCH 4/7] power: supply: axp20x_usb_power: Use a match structure

2020-01-01 Thread Samuel Holland
Instead of ad-hoc variant ID checks throughout the code, let's start moving the variant-specific details to a match structure. This allows for future flexibility, and it better matches the other axp20x power supply drivers. Signed-off-by: Samuel Holland --- drivers/power/supply

[linux-sunxi] [PATCH 1/3] clk: sunxi-ng: sun8i-r: Fix divider on APB0 clock

2019-12-28 Thread Samuel Holland
the definitions. Signed-off-by: Samuel Holland --- drivers/clk/sunxi-ng/ccu-sun8i-r.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-r.c b/drivers/clk/sunxi-ng/ccu-sun8i-r.c index 4646fdc61053..4c8c491b87c2 100644 --- a/drivers/clk

[linux-sunxi] [PATCH 2/3] clk: sunxi-ng: h6-r: Simplify R_APB1 clock definition

2019-12-28 Thread Samuel Holland
Like the APB0 clock on previous chips, this is a simple single-parent clock with an M divider. Use the equivalent helper macro instead of writing out the whole clock description manually. Signed-off-by: Samuel Holland --- drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 12 +--- 1 file changed

[linux-sunxi] [PATCH 3/3] clk: sunxi-ng: h6-r: Fix AR100/R_APB2 parent order

2019-12-28 Thread Samuel Holland
| 11422 (unstable) | iosc/osc16M | | 3 | 5 | 85338 (stable) | pll-periph0 | | 3 | 17 | 27167 (stable) | pll-periph0 | The relative performance numbers all match up (with pll-periph0 running at its default 600MHz). Signed-off-by: Samuel Holland

[linux-sunxi] [PATCH 0/3] A64/H3/H6 R_CCU clock fixes

2019-12-28 Thread Samuel Holland
the I2C/RSB frequency. Patch 2 should have no functional change. Patch 3 was verified by benchmarking. Details are in the commit message. [1]: https://github.com/Allwinner-Homlet/H6-BSP4.9-linux [2]: https://github.com/crust-firmware/crust Samuel Holland (3): clk: sunxi-ng: sun8i-r: Fix

Re: [linux-sunxi] [PATCH v2 2/9] power: supply: axp20x_ac_power: Fix reporting online status

2020-01-05 Thread Samuel Holland
Hi Julian, On 1/5/20 7:00 AM, Julian Calaby wrote: > On Sun, Jan 5, 2020 at 12:24 PM Samuel Holland wrote: >> >> AXP803/AXP813 have a flag that enables/disables the AC power supply >> input. This flag does not affect the status bits in PWR_INPUT_STATUS. >> Its effect

[linux-sunxi] [PATCH] arm64: dts: allwinner: a64: pinebook: Fix lid wakeup

2020-01-04 Thread Samuel Holland
By default, gpio-keys configures the pin to trigger wakeup IRQs on either edge. The lid switch should only trigger wakeup when opening the lid, not when closing it. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 ++ 1 file changed, 2 insertions

[linux-sunxi] [PATCH v2 7/9] power: supply: axp20x_usb_power: Allow offlining

2020-01-04 Thread Samuel Holland
VBUS input is disabled via the PATH_SEL bit, the VBUS_USED bit in PWR_INPUT_STATUS is cleared, so there is no change needed when getting the property. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 27 + 1 file changed, 27 insertions(+) diff

[linux-sunxi] [PATCH v2 2/9] power: supply: axp20x_ac_power: Fix reporting online status

2020-01-04 Thread Samuel Holland
this flag into account when getting the ONLINE property of the AC input, on PMICs where this flag is present. Fixes: 7693b5643fd2 ("power: supply: add AC power supply driver for AXP813") Cc: sta...@vger.kernel.org Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_ac_po

[linux-sunxi] [PATCH v2 9/9] power: supply: axp20x_usb_power: Only poll while offline

2020-01-04 Thread Samuel Holland
olling will cease until the next VBUS_REMOVAL IRQ. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 30 + 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_p

[linux-sunxi] [PATCH v2 4/9] power: supply: axp20x_ac_power: Add wakeup control

2020-01-04 Thread Samuel Holland
on the PMIC are all disabled. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_ac_power.c | 91 +- 1 file changed, 74 insertions(+), 17 deletions(-) diff --git a/drivers/power/supply/axp20x_ac_power.c b/drivers/power/supply/axp20x_ac_power.c index bc2663cd47fa

[linux-sunxi] [PATCH v2 6/9] power: supply: axp20x_usb_power: Use a match structure

2020-01-04 Thread Samuel Holland
Instead of ad-hoc variant ID checks throughout the code, let's start moving the variant-specific details to a match structure. This allows for future flexibility, and it better matches the other axp20x power supply drivers. Signed-off-by: Samuel Holland --- drivers/power/supply

[linux-sunxi] [PATCH v2 8/9] power: supply: axp20x_usb_power: Add wakeup control

2020-01-04 Thread Samuel Holland
on the PMIC are all disabled. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 80 - 1 file changed, 65 insertions(+), 15 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index

[linux-sunxi] [PATCH v2 0/9] X-Powers Power Supply Improvements

2020-01-04 Thread Samuel Holland
- Shift value properly in calls to regmap_update_bits (3, 7) - Use #ifdef instead of #if to avoid -Wundef warnings (4, 8) - Poll once after an IRQ, instead of setting power->online in the IRQ (9) - Poll once on resume, in case the state changed during suspend (9) Samuel Holland (9): mfd: axp

[linux-sunxi] [PATCH v2 1/9] mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile

2020-01-04 Thread Samuel Holland
will think the bit is already set and not write the register. Fixes: cd53216625a0 ("mfd: axp20x: Fix axp288 volatile ranges") Cc: sta...@vger.kernel.org Signed-off-by: Samuel Holland --- drivers/mfd/axp20x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mf

[linux-sunxi] [PATCH v2 3/9] power: supply: axp20x_ac_power: Allow offlining

2020-01-04 Thread Samuel Holland
AXP803/AXP813 have a flag that enables/disables the AC power supply input. Allow control of this flag via the ONLINE property on those variants. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_ac_power.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[linux-sunxi] [PATCH v2 5/9] power: supply: axp20x_usb_power: Remove unused device_node

2020-01-04 Thread Samuel Holland
This member of struct axp20x_usb_power is not used anywhere. Remove it. Signed-off-by: Samuel Holland --- drivers/power/supply/axp20x_usb_power.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index

Re: [linux-sunxi] [PATCH v2 7/9] power: supply: axp20x_usb_power: Allow offlining

2020-01-05 Thread Samuel Holland
On 1/5/20 4:40 AM, Chen-Yu Tsai wrote: > On Sun, Jan 5, 2020 at 9:24 AM Samuel Holland wrote: >> >> AXP803/AXP813 have a flag that enables/disables the USB power supply >> input. Allow control of this flag via the ONLINE property on those >> variants. >> >>

Re: [linux-sunxi] [PATCH v2 6/9] power: supply: axp20x_usb_power: Use a match structure

2020-01-05 Thread Samuel Holland
On 1/5/20 4:34 AM, Chen-Yu Tsai wrote: > On Sun, Jan 5, 2020 at 9:24 AM Samuel Holland wrote: >> >> Instead of ad-hoc variant ID checks throughout the code, let's start >> moving the variant-specific details to a match structure. This allows >> for future flexibi

[linux-sunxi] [PATCH] media: cedrus: Implement runtime PM

2020-04-07 Thread Samuel Holland
This allows the VE clocks and PLL_VE to be disabled most of the time. Since the device is stateless, each frame gets a separate runtime PM reference. Enable autosuspend so the PM callbacks are not run before and after every frame. Signed-off-by: Samuel Holland --- I tested this with v4l2

Re: [linux-sunxi] [PATCH] media: cedrus: Implement runtime PM

2020-04-19 Thread Samuel Holland
On 4/8/20 11:01 AM, Jernej Škrabec wrote: > Hi Samuel! > > Dne sreda, 08. april 2020 ob 03:02:32 CEST je Samuel Holland napisal(a): >> This allows the VE clocks and PLL_VE to be disabled most of the time. >> >> Since the device is stateless, each frame gets a separ

[linux-sunxi] Re: [PATCH v7 0/6] Allwinner sun6i message box support

2020-04-01 Thread Samuel Holland
On 2/22/20 10:08 PM, Samuel Holland wrote: > Samuel Holland (6): > dt-bindings: mailbox: Add a binding for the sun6i msgbox > mailbox: sun6i-msgbox: Add a new mailbox driver These two patches have been applied for 5.7[1], so the DTS changes should be ready to apply as well. [

[linux-sunxi] [PATCH] arm64: dts: allwinner: a64: pinetab: Fix cpvdd supply name

2020-04-26 Thread Samuel Holland
quot;cpvdd". This board's device tree still uses the old name, which fails to work at runtime, and which causes a warning from `make dtbs_check`. Resolve both by fixing the name. Fixes: 674ef1d0a7b2 ("arm64: dts: allwinner: a64: add support for PineTab") Signed-off-by: Samuel Hol

[linux-sunxi] [PATCH v2] arm64: dts: allwinner: a64: Remove unused SPDIF sound card

2020-04-26 Thread Samuel Holland
the sound card and codec DAI belong in the individual board DTS, not the SoC DTSI. In fact, no in-tree A64 board DTS enables , so let's remove the card and DAI entirely. This reverts commit 78e071370a86473f25923e03b51cbbadacf8be0f. Signed-off-by: Samuel Holland --- Changes since v1: - Remove

[linux-sunxi] Re: [PATCH] arm64: dts: allwinner: a64: Disable SPDIF by default

2020-04-22 Thread Samuel Holland
Maxime, On 4/22/20 10:16 AM, Maxime Ripard wrote: > On Tue, Apr 21, 2020 at 11:15:02PM -0500, Samuel Holland wrote: >> As of v5.7-rc2, Linux now prints the following message at boot: >> >> [ 33.848525] platform sound_spdif: deferred probe pending >> >> This is

[linux-sunxi] [PATCH v2 1/2] media: cedrus: Program output format during each run

2020-04-21 Thread Samuel Holland
() is now placed just before the codec-specific callback that programs the hardware. Fixes: 50e761516f2b ("media: platform: Add Cedrus VPU decoder driver") Suggested-by: Jernej Škrabec Suggested-by: Paul Kocialkowski Signed-off-by: Samuel Holland --- v2: added patch --- drivers/sta

[linux-sunxi] [PATCH v2 2/2] media: cedrus: Implement runtime PM

2020-04-21 Thread Samuel Holland
This allows the VE clocks and PLL_VE to be disabled most of the time. A runtime PM reference is held while streaming. Originally-by: Jernej Škrabec Signed-off-by: Samuel Holland --- v2: moved PM reference to cedrus_{start,stop}_streaming, based on an earlier patch by Jernej Skrabec

Re: [linux-sunxi] [RFC PATCH 4/4] pwm: sun4i: Delay after writing the period

2020-04-21 Thread Samuel Holland
Hello Pascal, On 3/17/20 10:59 AM, Pascal Roeleven wrote: > When disabling, ensure the period write is complete before continuing. > This fixes an issue on some devices when the write isn't complete before > the panel is turned off but the clock gate is still on. > > Signed-off-by: Pascal

[linux-sunxi] [PATCH] arm64: dts: allwinner: a64: Disable SPDIF by default

2020-04-21 Thread Samuel Holland
As of v5.7-rc2, Linux now prints the following message at boot: [ 33.848525] platform sound_spdif: deferred probe pending This is because _spdif is waiting on its DAI link component to probe, but is disabled in the DTS. Disable the audio card as well to match. Signed-off-by: Samuel

[linux-sunxi] [PATCH v3 2/2] media: cedrus: Implement runtime PM

2020-05-09 Thread Samuel Holland
From: Jernej Skrabec This allows the VE clocks and PLL_VE to be disabled most of the time. A runtime PM reference is held while streaming. Signed-off-by: Jernej Skrabec Signed-off-by: Samuel Holland Tested-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia --- v2: moved PM reference

[linux-sunxi] [PATCH v3 1/2] media: cedrus: Program output format during each run

2020-05-09 Thread Samuel Holland
() is now placed just before the codec-specific callback that programs the hardware. Cc: Fixes: 50e761516f2b ("media: platform: Add Cedrus VPU decoder driver") Suggested-by: Jernej Skrabec Suggested-by: Paul Kocialkowski Signed-off-by: Samuel Holland Tested-by: Jernej Skrabec Reviewed-

Re: [linux-sunxi] [PATCH v2 2/2] media: cedrus: Implement runtime PM

2020-05-09 Thread Samuel Holland
On 5/5/20 7:53 AM, Ezequiel Garcia wrote: > On Wed, 22 Apr 2020 at 01:00, Samuel Holland wrote: >> >> This allows the VE clocks and PLL_VE to be disabled most of the time. >> A runtime PM reference is held while streaming. >> >> Originally-by: Jernej Škrabec >

[linux-sunxi] Re: [PATCH v2 02/20] ASoC: sun4i-i2s: Add support for H6 I2S

2020-09-03 Thread Samuel Holland
Clément, On 9/3/20 3:30 PM, Clément Péron wrote: > From: Jernej Skrabec > > H6 I2S is very similar to that in H3, except it supports up to 16 > channels. > > Signed-off-by: Jernej Skrabec > Signed-off-by: Marcus Cooper > Signed-off-by: Clément Péron > --- > sound/soc/sunxi/sun4i-i2s.c |

[linux-sunxi] Re: [PATCH v2 03/20] ASoC: sun4i-i2s: Adjust LRCLK width

2020-09-03 Thread Samuel Holland
Clément, On 9/3/20 3:30 PM, Clément Péron wrote: > From: Marcus Cooper > > Some codecs such as i2s based HDMI audio and the Pine64 DAC require > a different amount of bit clocks per frame than what is calculated > by the sample width. Use the values obtained by the tdm slot bindings > to adjust

Re: [linux-sunxi] [PATCH 05/16] ASoc: sun4i-i2s: Add 20 and 24 bit support

2020-09-02 Thread Samuel Holland
On 9/2/20 1:10 PM, Jernej Škrabec wrote: > Hi Samuel! > > Dne petek, 10. julij 2020 ob 07:44:51 CEST je Samuel Holland napisal(a): >> On 7/4/20 6:38 AM, Clément Péron wrote: >>> From: Marcus Cooper >>> >>> Extend the functionality of the driver to includ

[linux-sunxi] Re: [PATCH v6 02/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-05 Thread Samuel Holland
; i2s->slot_width is not actually used in the lrck_period computation. >> >> Suggested-by: Samuel Holland >> Signed-off-by: Clément Péron >> --- >> sound/soc/sunxi/sun4i-i2s.c | 36 ++-- >> 1 file changed, 14 insertio

[linux-sunxi] Re: [PATCH v6 02/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-12 Thread Samuel Holland
n set_chan_cfg(). This will >>>> duplicate the same check instead pass the required values >>>> as params to set_chan_cfg(). >>>> >>>> This will also avoid a bug when we will enable 20/24bits support, >>>> i2s->slot_width is not

[linux-sunxi] Re: [PATCH] RFC: arm64: arch_timer: Fix timer inconsistency test for A64

2020-09-29 Thread Samuel Holland
On 9/29/20 10:40 AM, Mark Rutland wrote: > Hi, > > Please Cc maintainers for drivers -- Marc and I maintain the arch timer > driver. > > On Tue, Sep 29, 2020 at 02:13:47PM +0300, Roman Stratiienko wrote: >> Fixes linux_kselftest:timers_inconsistency-check_arm_64 >> >> Test logs without the fix:

[linux-sunxi] Re: [PATCH v3 3/5] drm: panel: Add Xingbangda XBD599 panel (ST7703 controller)

2020-05-27 Thread Samuel Holland
On 5/13/20 4:24 PM, Ondrej Jirman wrote: > From: Icenowy Zheng > > Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI IPS LCD panel made by > Xingbangda, which is used on PinePhone final assembled phones. > > It is based on Sitronix ST7703 LCD controller. > > Add support for it. > >

[linux-sunxi] [PATCH v2 5/9] ARM: dts: sunxi: h3/h5: Move wakeup-capable IRQs to r_intc

2020-05-24 Thread Samuel Holland
All IRQs that can be used to wake up the system must be routed through r_intc, so they are visible to firmware while the system is suspended. For the H3/H5, r_intc IRQ numbers are offset by 32 from the GIC IRQ numbers. Signed-off-by: Samuel Holland --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 11

[linux-sunxi] [PATCH v2 2/9] irqchip/sun6i-r: Add wakeup support

2020-05-24 Thread Samuel Holland
sources Linux wants to have enabled. That way, it can avoid turning them off when it shuts down the remainder of the clock tree. Second, it preconfigures the coprocessor's interrupt controller, so the firmware's wakeup logic is as simple as waiting for an interrupt to arrive. Signed-off-by: Samuel

[linux-sunxi] Re: [PATCH 1/9] irqchip/sun6i-r: Switch to a stacked irqchip driver

2020-05-24 Thread Samuel Holland
both edge and level interrupts. I tested both triggers, albeit with the same source of (level) interrupts connected to the NMI pin. On 1/20/20 4:52 AM, Marc Zyngier wrote: > Hi Samuel, > > On 2020-01-13 05:49, Samuel Holland wrote: >> The R_INTC in the A31 and newer sun8i/su

[linux-sunxi] [PATCH v2 9/9] arm64: dts: allwinner: h6: Move wakeup-capable IRQs to r_intc

2020-05-24 Thread Samuel Holland
All IRQs that can be used to wake up the system must be routed through r_intc, so they are visible to firmware while the system is suspended. For the H6, r_intc IRQ numbers are offset by 96 from the GIC IRQ numbers. Signed-off-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi

[linux-sunxi] [PATCH v2 4/9] ARM: dts: sunxi: h3/h5: Add r_intc node

2020-05-24 Thread Samuel Holland
The H3 and H5 SoCs have an additional interrupt controller in the RTC power domain that can be used to enable wakeup for certain IRQs. Add a node for it. Signed-off-by: Samuel Holland --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm

<    1   2   3   4   >