Skip to content

Commit

Permalink
dts/revpi-connect: Add KSZ8851 reset delay workaround
Browse files Browse the repository at this point in the history
The KSZ8851 on the RevPi Connect has a circuit which will keep it for
around 80ms in the reset when the reset gpio is released. The driver
needs to wait this time after the reset gpio is released. The driver has
no support for this. So we use a regulator with the approprieate delays
as workaround.

The startup-delay is set to 80ms. So The driver should wait for at least
80ms after enabling the regulator. The off-on-delay is set to 11.5ms.
The data sheet of the KSZ8851 says it needs a 10ms reset and the circuit
adds 1.5ms to drain the capacitor.

Signed-off-by: Philipp Rosenberger <p.rosenberger@kunbus.com>
  • Loading branch information
Philipp Rosenberger committed Oct 25, 2021
1 parent 640ed56 commit 48191ce
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion arch/arm/boot/dts/overlays/revpi-connect-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@
compatible = "kunbus,revpi-connect", "brcm,bcm2837",
"brcm,bcm2836";

/*
The reset of the KSZ8851 used for the pibridge has a
circuit, which keeps it pulled for up to 80ms. To
workaroud this issue, a regulator is used. The
circuit implements a reset instead of a n_reset.
*/
pb_rst: regulator_pbrst {
compatible = "regulator-fixed";
regulator-name = "pb_rst";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio 40 GPIO_ACTIVE_LOW>;
startup-delay-us = <80000>;
};

leds {
compatible = "gpio-leds";
power_red {
Expand Down Expand Up @@ -151,7 +166,7 @@
interrupt-parent = <&gpio>;
#interrupt-cells = <2>;
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
vdd-supply = <&pb_rst>;
status = "okay";
};
};
Expand Down

0 comments on commit 48191ce

Please sign in to comment.