Commit Graph

22 Commits

Author SHA1 Message Date
Jernej Skrabec 145988cff2
ARM: dts: sun8i: Adjust power key nodes
Several H3 and one H2+ board have power key nodes, which are slightly
off. Some are missing wakeup-source property and some have BTN_0 code
assigned instead of KEY_POWER.

Adjust them, so they can function as intended by designer.

Co-developed-by: Michael Klein <michael@fossekall.de>
Signed-off-by: Michael Klein <michael@fossekall.de>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20211129165510.370717-1-jernej.skrabec@gmail.com
2021-12-01 09:21:06 +01:00
Olof Johansson 68a3ead584 Allwinner H3/H5 changes for 5.2
Our usual bunch of changes shared between arm and arm64, the most notable
 one being:
   - Fix of improper usage of DT bindings, thanks to the DT validation
   - Add the SID for the H3 and H5
   - New board: RerVision H3-DVK
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXLm2aQAKCRDj7w1vZxhR
 xQJYAQDs7mcoEHwBqw+1iZGmHZuvj4jJXdAd/FkmoujMawaGoQD/a4zddy8AL7s9
 WA9I42cSuBwfZjftLX/br4Ycssd1sgQ=
 =90I8
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-h3-h5-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

Allwinner H3/H5 changes for 5.2

Our usual bunch of changes shared between arm and arm64, the most notable
one being:
  - Fix of improper usage of DT bindings, thanks to the DT validation
  - Add the SID for the H3 and H5
  - New board: RerVision H3-DVK

* tag 'sunxi-h3-h5-for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: dts: sun8i: mapleboard: Remove cd-inverted
  ARM: dts: sunxi: h3/h5: Remove useless phy-names from EHCI and OHCI
  ARM: dts: sun8i: h3: bluetooth for Banana Pi M2 Zero board
  ARM: dts: sun8i: h3: Add default dr_mode
  ARM: dts: sun8i: h3: Refactor the pinctrl node names
  ARM: dts: sunxi: h3/h5: Remove stale pinctrl-names entry
  ARM: dts: sunxi: h3/h5: Add device node for SID
  ARM: dts: sun8i-h3: Add support for the RerVision H3-DVK board

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-04-28 12:42:35 -07:00
Maxime Ripard 18009b802b
ARM: dts: sunxi: Remove useless pinctrl nodes
We have for the H3 boards some kind of cargo cult apparently, where we
would have a pinctrl node even for GPIOs without any particular settings.

This is pretty much useless, so let's remove them.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-04-04 09:25:15 +02:00
Maxime Ripard a4dc791974
ARM: dts: sun8i: h3: Refactor the pinctrl node names
The H3 and H5 have never been converted to the new convention we want to
have for the pinctrl nodes.

Convert them.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-03-25 21:05:42 +01:00
Ondrej Jirman 06139c822c ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
Orange Pi PC, then set the power supply of the ARM cores to this
regulator, in order to enable DVFS.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Enable DVFS in this patch, slight changes and change commit
 message]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-05-11 10:00:28 +02:00
Jernej Skrabec f0842bc563
ARM: dts: sun8i: h3: Enable HDMI output on H3 boards
Enable HDMI output on all boards which have HDMI connector.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-03-02 10:38:26 +01:00
Joonas Kylmälä 50caa75681
ARM: dts: sunxi: h3-h5: Move pinctrl of mmc0 from dts to dtsi
Most of the boards use the mmc0 pins and their attributes defined in
mmc0_pins_a. Let's default to those by moving the pinctrl attributes
to the dtsi file. This makes it easier to modify device trees in the
future as there is only one place to change the pinctrl attributes.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-02-14 13:18:04 +01:00
Joonas Kylmälä f8d5fe8fc3
ARM: dts: sunxi: h3-h5: remove mmc0 card detection pin from pinctrl
The GPIO card detection pin (mmc0_cd_pin) is already requested and
configured by mmc_gpiod_request_cd() in drivers/mmc/core/slot-gpio.c
so pinctrl is not needed.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-02-14 13:18:03 +01:00
Tuomas Tynkkynen 45e01f401a
ARM: dts: sunxi: Switch MMC nodes away from cd-inverted property
Using the cd-inverted property is not useful when GPIOs are used as card
detects since the polarity can be specified with the usual
GPIO_ACTIVE_(HIGH|LOW) GPIO flags. It has also caused confusion for
U-Boot developers, so migrate all sunxi boards away from cd-inverted.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-02-13 09:37:22 +01:00
Corentin Labbe 4904337fe3 ARM: dts: sunxi: Restore EMAC changes (boards)
The original dwmac-sun8i DT bindings have some issue on how to handle
integrated PHY and was reverted in last RC of 4.13.
But now we have a solution so we need to get back that was reverted.

This patch restore all boards DT about dwmac-sun8i
This reverts partially commit fe45174b72 ("arm: dts: sunxi: Revert EMAC changes")

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-11-02 09:02:13 +01:00
Corentin LABBE c71ec4055d ARM: dts: sun8i: h3: Fix node with unit name and no reg property
This patch fixes the warning "xxx has a unit name, but no reg property"
by removing "@0" from such node. 6 board files are fixed. Each has the
same aforementioned issue in pinmux nodes. These include the Nano Pi
family base dtsi file, the Orange Pi 2, Orange Pi Lite, Orange Pi One,
Orange Pi PC, and Orange Pi Plus.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
[wens@csie.org: Squashed 6 patches together; boards named in commit log]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-09-27 16:20:30 +08:00
Maxime Ripard fe45174b72 arm: dts: sunxi: Revert EMAC changes
Since the discussion is not settled yet for the EMAC, and that the release
in getting really close, let's revert the changes for now, and we'll
reintroduce them later.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-08-28 11:11:24 +02:00
Olof Johansson 4daea49941 Allwinner H3 changes for 4.13
This tag is about bringing the EMAC support to the H3 boards.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJZQZqLAAoJEBx+YmzsjxAgyn0P/3ZYfm7/aNwEBs7OjDv9mFb+
 0b7nuSd2meiGcJKZXeimrYeFEUUEgFBNB++yHXSkVOpIdgf1RGO5KrCFhqfQcpq4
 uluwtpNoWHeDp5vg1Oa93gJSg31r/a/m0r+Tp+xfDShZUrJr30YSn+7XVammTJov
 KW9SfX2z3re1dB1zsxojPA6CZxuUCzMBGfx/bJ8p9UqKAYdAHcKsLNSlc8ykTG3/
 2FooaMn8pPfeeSq6O8HFJLSFEYc48Hkcyy6ZFDqWoUeG0gLyB8jl/5xfsEEfLllW
 ljvRDT499uoRLpOS4LUMyavSZAiBvyqv2tz+8bMiHqEzTieVWS9UEKDJvsAe+7Js
 jWo5EHvLay3/jRMCdIYmR2xcomiyUxEWwqiCQaNnVOiKB8b+SmznuJZhcPJeTDdD
 SBjn1iTFnl60UAOJ0IKsIta9jdiJ05bmQawpEqVpMvjvDvakLqBXUVH8EDm/wBEH
 T6qY33Yv7dORKEws06duB4+fpQ+T6Gmeihwuyi4t5ogDhXOMrb662uztEaUHb78Q
 7DOL7hunzyhLJYFmPRo6Ot01j1K2mhuD27NbP1WiN2zSf3t0c9m0GZCS2rGfD9vV
 Aw6tccyQed4w3gPxA7AZz91336tIGvMwEVkn0AR6bO0fGrceQ9V80Ff8xaZjtF14
 Pjx3BTBE/9dW1pPqHJlm
 =1g1O
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt-h3-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt

Allwinner H3 changes for 4.13

This tag is about bringing the EMAC support to the H3 boards.

* tag 'sunxi-dt-h3-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: sun8i: h3: Enable EMAC with external PHY on Orange Pi Plus 2E
  arm: sun8i: orangepi-zero: Enable dwmac-sun8i
  ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i
  ARM: sun8i: orangepi-plus: Enable dwmac-sun8i
  arm: sun8i: nanopi-neo: Enable dwmac-sun8i
  arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high
  arm: sun8i: orangepi-2: Enable dwmac-sun8i
  arm: sun8i: orangepi-one: Enable dwmac-sun8i
  arm: sun8i: orangepi-pc: Enable dwmac-sun8i
  arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver
  arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module
  ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-06-18 20:43:28 -07:00
Corentin Labbe d342cb6f01 arm: sun8i: orangepi-pc: Enable dwmac-sun8i
The dwmac-sun8i hardware is present on the Orange PI PC.
It uses the internal PHY.

This patch create the needed emac node.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-06-06 20:05:56 +02:00
Chen-Yu Tsai 52826587a4 ARM: sun8i: h3: orangepi-pc: Enable USB OTG
The Orange Pi PC, PC Plus, and Plus 2E all have a USB OTG port
that can be used in both powered host mode and peripheral mode.
When in peripheral mode, the port does not power the board.
There is no VBUS sensing on the port. All three boards have all
related pins routed the same way.

The device tree file for the Orange Pi Plus 2E is based on the
Orange Pi PC Plus, which itself is based on the Orange Pi PC.
Changes to the base Orange Pi PC device tree file affects all 3
boards.

This patch adds the regulator controlling VBUS on the OTG port,
the GPIO for the ID detect pin, and enables the USB OTG and host
controllers.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-05-14 08:32:31 +02:00
Chen-Yu Tsai 85d2913614 ARM: dts: sunxi: Remove no longer used pinctrl/sun4i-a10.h header
All dts files for the sunxi platform have been switched to the generic
pinconf bindings. As a result, the sunxi specific pinctrl macros are
no longer used.

Remove the #include entry with the following command:

    sed --follow-symlinks -i -e '/pinctrl\/sun4i-a10.h/D' \
	arch/arm/boot/dts/sun?i*.*

arch/arm/boot/dts/sun9i-a80.dtsi was then edited to remove the extra
empty line.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-03-27 13:39:58 +02:00
Chen-Yu Tsai 282d45ba47 ARM: dts: sun8i-h3: orange-pi-pc: Enable audio codec
The Orange Pi PC routes the LINEOUT pins to the audio out jack on the
board. The onboard microphone is routed to MIC1, with MBIAS providing
power.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-01-10 18:52:53 +01:00
Maxime Ripard 1edcd36fcb ARM: sunxi: Convert pinctrl nodes to generic bindings
Now that we can handle the generic pinctrl bindings, convert our DT to it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2016-12-26 08:27:11 +01:00
Maxime Ripard 119c366aea ARM: sunxi: Remove useless allwinner,pull property
The allwinner,pull property set to NO_PULL was really considered our
default (and wasn't even changing the default value in the code).

Remove these properties to make it obvious that we do not set anything in
such a case.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2016-12-26 08:24:50 +01:00
Maxime Ripard d312f6fb80 ARM: sunxi: Remove useless allwinner,drive property
The allwinner,drive property set to 10mA was really considered as our
default. Remove all those properties entirely to make that obvious.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2016-12-26 08:24:50 +01:00
Jorik Jonker 33d9fc06ca dts: sun8i-h3: associate exposed UARTs on Orange Pi Boards
These H3 boards all expose UART1-3 on their expansion header. Since
other functions can be muxed to these pins, they are explicitly
disabled. To enable them, one could use DT overlays or U-boot commands:

 => fdt set /soc/serial@01c28c00 status okay

Signed-off-by: Jorik Jonker <jorik@kippendief.biz>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-09-21 11:48:09 +03:00
Chen-Yu Tsai 7b4fad5f22 ARM: dts: sun8i: Add Orange Pi PC support
The Orange Pi PC is an SBC based on the Allwinner H3 SoC with a uSD slot,
3 USB ports directly from the SoC, a 10/100M ethernet port using the
SoC's integrated PHY, USB OTG, HDMI, a TRRS headphone jack for stereo out
and composite out, a microphone, an IR receiver, a CSI connector, 2 LEDs,
a 3 pin UART header, and a 40-pin GPIO header.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-03-27 16:15:04 +02:00