1
0
Fork 0
Commit Graph

23 Commits (46d5e62dd3c34770f3bfd0642daa9a7772a00362)

Author SHA1 Message Date
Adam Sampson a7361b9c46
ARM: dts: sun7i: pcduino3-nano: enable RGMII RX/TX delay on PHY
The RX/TX delays for the Ethernet PHY on the Linksprite pcDuino 3 Nano
are configured in hardware, using resistors that are populated to pull
the RTL8211E's RXDLY/TXDLY pins low or high as needed.

phy-mode should be set to rgmii-id to reflect this. Previously it was
set to rgmii, which used to work but now results in the delays being
disabled again as a result of the bugfix in commit bbc4d71d63 ("net:
phy: realtek: fix rtl8211e rx/tx delay config").

Tested on two pcDuino 3 Nano boards purchased in 2015. Without this fix,
Ethernet works unreliably on one board and doesn't work at all on the
other.

Fixes: 061035d456 ("ARM: dts: sun7i: Add dts file for pcDuino 3 Nano board")
Signed-off-by: Adam Sampson <ats@offog.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20201123174739.6809-1-ats@offog.org
2020-11-24 15:24:28 +01:00
Chen-Yu Tsai 968f2c9169
ARM: dts: sunxi: Add mdio bus sub-node to GMAC
The DWMAC binding never supported having the Ethernet PHY node as a
direct child to the controller, nor did it support the "phy" property
as a way to specify which Ethernet PHY to use. What seemed to work
was simply the implementation ignoring the "phy" property and instead
probing all addresses on the MDIO bus and using the first available
one.

The recent switch from "phy" to "phy-handle" breaks the assumptions
of the implementation, and does not match what the binding requires.
The binding requires that if an MDIO bus is described, it shall be
a sub-node with the "snps,dwmac-mdio" compatible string.

Add a device node for the MDIO bus, and move the Ethernet PHY node
under it. Also fix up the #address-cells and #size-cells properties
where needed.

Fixes: de332de26d ("ARM: dts: sunxi: Switch from phy to phy-handle")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-08-23 09:14:48 +02:00
Maxime Ripard de332de26d
ARM: dts: sunxi: Switch from phy to phy-handle
The phy device tree property has been deprecated in favor of phy-handle,
let's replace it.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-07-22 09:41:10 +02:00
Maxime Ripard a107bd2b6b
ARM: dts: sunxi: Remove pinctrl groups setting bias
So far we've enabled pull-up and pull-down resistors on GPIOs using a
pinctrl node. Now that the GPIO binding allows for a flag to declare this,
let's switch to it.

This brings us closer to removing all the GPIO pinctrl nodes, which will in
turn allow us to switch the pinctrl strict mode on.

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 2c515b0d05
ARM: sunxi: Fix the USB PHY ID detect GPIO properties
While the USB PHY Device Tree mandates that the name of the ID detect pin
should be usb0_id_det-gpios, a significant number of device tree use
usb0_id_det-gpio instead.

This was functional because the GPIO framework falls back to the gpio
suffix that is legacy, but we should fix this.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-03-25 21:26:27 +01:00
Maxime Ripard 7dab9adb7d
ARM: dts: sun7i: Provide default muxing for relevant controllers
The I2C and MMC controllers have only one muxing option in the SoC. In such a
case, we can just move the muxing into the DTSI, and remove it from
the DTS.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
2018-11-28 15:14:15 +01:00
Maxime Ripard 0356f1ae06
ARM: dts: sun7i: Remove underscores from nodes names
Some GPIO pinctrl nodes cannot be easily removed, because they would also
change the pin configuration, for example to add a pull resistor or change
the current delivered by the pin.

Those nodes still have underscores and unit-addresses in their node names
in our DTs, so adjust their name to remove the warnings. Use that occasion
to also fix some poorly chosen node-names.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
2018-11-28 15:14:14 +01:00
Maxime Ripard 85a8c520ca
ARM: dts: sun7i: Change pinctrl nodes to avoid warning
All our pinctrl nodes were using a node name convention with a unit-address
to differentiate the different muxing options. However, since those nodes
didn't have a reg property, they were generating warnings in DTC.

In order to accomodate for this, convert the old nodes to the syntax we've
been using for the new SoCs, including removing the letter suffix of the
node labels to the bank of those pins to make things more readable.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
2018-11-28 15:14:13 +01:00
Maxime Ripard 054da074b1
ARM: dts: sun7i: Remove all useless pinctrl nodes
The gpio pinctrl nodes are redundant and as such useless most of the times.
Since they will also generate warnings in DTC, we can simply remove most of
them.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
2018-11-28 15:14:12 +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
Tuomas Tynkkynen ad87b75f16 ARM: dts: sun7i: Enable HDMI on pcDuino3 Nano
The board has a regular-sized HDMI connector, so enable the display
the pipeline and HDMI output for it.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-12-15 15:46:17 +01:00
Chen-Yu Tsai cf439662af ARM: sunxi: Drop mmc0_cd_pin_reference_design pinmux setting
As part of our effort to move pinctrl/GPIO interlocking into the
driver where it belongs, this patch drops the definition and usage
of the mmc0_cd_pin_reference_design pinmux setting for the default
mmc0 card detect GPIO pin.

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
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
Adam Sampson e04a61c04a ARM: sun7i: dt: Enable audio codec on pcDuino V3 Nano
The pcDuino V3 Nano has a 3.5mm TRRS jack socket for audio, using the
CTIA standard pinout, connected to HPOUTL, HPOUTR, HPCOM/HPCOMFB and
MICIN1/VMIC (via appropriate RC networks) on the A20. The PH00 GPIO is
wired for headphone plug detection: it reads 0 when nothing's plugged
in, and 1 when a plug is inserted.

LINEINL/R and FMINL/R are not connected.

Signed-off-by: Adam Sampson <ats@offog.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-11-17 09:40:07 +01:00
Adam Sampson f5bad43b53 ARM: dts: sun7i: Enable USB DRC on pcDuino v3 Nano
The OTG arrangement on the LinkSprite pcDuino v3 Nano is the same as the
pcDuino 1/2/3: the OTG port's 5V line is connected directly to the 5V
bus (it's not switchable), and the OTG port's ID pin is connected to PH4
on the A20.

Tested successfully in both host and device modes.

Signed-off-by: Adam Sampson <ats@offog.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-10-19 20:05:24 +02:00
Adam Sampson 8a880ee6da ARM: dts: sun7i: Add regulator configuration for pcDuino v3 Nano
The power configuration on this board is the same as the pcDuino v3.
This will enable frequency/voltage scaling over the standard A20
operating points from 144 MHz to 960 MHz.

Tested using cpufreq-ljt-stress-test on two pcDuino v3 Nano boards; also
tested successfully with voltages reduced by 0.025 V.

Signed-off-by: Adam Sampson <ats@offog.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-10-13 20:44:09 +02:00
Adam Sampson b3f3db9c39 ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano
The LinkSprite pcDuino v3 Nano's two USB host ports are powered by a
single RT9701GB regulator, which has its enable input tied to the A20's
PD2 pin, pulled up to 3v3 via a 10k resistor.

However, the script.bin that shipped with the device listed PH11 and PH3
as Vbus control pins for the two USB ports. Neither of these are
actually connected to anything.

Siarhei Siamashka spotted this problem while reviewing the other
LinkSprite boards. This patch fixes it by only defining a single
regulator, controlled by PD2. Testing shows that the USB ports are now
(correctly) only powered up once the USB PHY driver is loaded.

Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Adam Sampson <ats@offog.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-10-11 19:27:13 +02:00
Maxime Ripard c0c2eb2476 ARM: sunxi: dt: Remove the FSF address
The FSF address triggers a warning on checkpatch, saying that the FSF
license is already present in the Linux source code, and that it has
already changed in the past.

Remove it from our DT, as suggested.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-05-10 10:22:23 +02:00
Marcus Cooper 469a22e6ba ARM: sunxi: dts: split IR pins for A10 and A20
Currently none of the target boards nor the driver supports
IR TX. However this pin is used in a few instances as a GPIO.
Split the pin ctrl descriptions so that only the IR RX is
configured to be used.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-05-02 13:52:55 +02:00
Maxime Ripard 59ebbe88a6 ARM: sunxi: DT: Add stdout-path property
Add UART aliases and stdout-path property for all the Allwinner boards so that
we won't have to rely on the bootargs' console= value, while working with
legacy bootloaders.

While we're at it, also remove the mentions of earlyprintk in the bootargs,
that will remove our default bootargs entirely, and allow the kernel to boot on
a system even if DEBUG_LL is configured for another system.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-04-27 08:20:30 +02:00
Adam Sampson 061035d456 ARM: dts: sun7i: Add dts file for pcDuino 3 Nano board
Add support for the LinkSprite pcDuino 3 Nano board. This is a low-cost
Allwinner A20 board with Arduino-style GPIO headers; it features 1G RAM,
4G NAND flash, 1 micro-SD, 2 USB sockets, 1 micro USB socket for OTG and
another for power in, HDMI, SATA, 5V power for SATA devices, gigabit
Ethernet, an IR receiver, 3.5mm audio out and a MIPI camera connector.

For more details, see: http://linux-sunxi.org/LinkSprite_pcDuino3_Nano

Changes in v3:
- rename LEDs to pcduino3-nano:green:usr[12]
- remove optional features on Arduino headers (i2c2, spi0, uart2)

Signed-off-by: Adam Sampson <ats@offog.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-04-27 08:20:16 +02:00