Mikhail Kshevetskiy mkshevetskiy
  • Joined on 2026-04-27
mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-06-09 00:14:07 +00:00
Pinctrl

some adoptation or upstream linux commits may required

mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-06-08 23:54:00 +00:00
Pinctrl

@mkshevetskiy I'm applying the patches and drivers/pinctrl/airoha/pinctrl-airoha.c is confusing in the patches for mediatek tree

╭─sirherobrine23@matheus-note /mnt/Data/airoha_e…
mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 23:46:45 +00:00
Pinctrl

In RouterOS, it seems that it keeps the SPI in control of the NOR (SPI cs0) and the active NAND in (SP0 cs1). Regarding the medium, I'm not very sure how it's handled since I don't have access…

mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 23:12:52 +00:00
Pinctrl

@Sirherobrine23 your tod_1pps patch is not good enougth. Here is proper variant. @merbanan Am I right about pin 21 ?

--- a/drivers/pinctrl/airoha/pinctrl-en7523.c
+++ b/drivers/pinctrl/…
mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 23:05:56 +00:00
Pinctrl

In theory you can reset and configure the phy in uboot and then never touch it in linux. But that sounds stupid and there should be enough other pins to support bit bang mdio from other…

mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 22:47:41 +00:00
Pinctrl

I'm currently working on my internet connection, so there will be times when I won't be able to respond.

in the mikrotik case mdio uses the same pin as spi_cs1.

We have an…

mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 22:20:15 +00:00
Pinctrl

in the microtic case mdio uses the same pin as spi_cs1.

We have an ugly hack in our old u-boot to avoid it

  1. save values of RG_GPIO_2ND_I2C_MODE (1FA20210), RG_GPIO_SPI_CS1_MODE(1FA20214),…
mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 21:43:32 +00:00
Pinctrl

your probably missed

&switch {
    pinctrl-names = "default";
    pinctrl-0 = <&mdio_pins>;
    status = "okay";
};

&pinctrl {
    gpio-ranges = <&pinctrl 0 12 28>;

    mdio_pins:…
mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 20:57:15 +00:00
Pinctrl

it should be

&pinctrl { gpio-ranges = <&pinctrl 0 12 28>; // <== you probably missed it ... }

mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 20:52:14 +00:00
Pinctrl

could you provide whole your &pinctrl {} dts part?

mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 20:49:10 +00:00
Pinctrl

This table is the list of GPIOs that we have mapped. In some devices we use PINs 11 and 10, and they are not mapped because when we use &pinctrl to map the GPIO, it takes the pin from…

mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 20:42:28 +00:00
Pinctrl

Actually airoha pin muxing does not require actual pin knowlegde, it operates using function and groups only.

So you can do some bad practice:

  • define fake pin (because you dont know proper…
mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-25 20:29:02 +00:00
Pinctrl

According to Benjamin table we have

mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-05-23 10:42:12 +00:00
Pinctrl

This changes breaks a lot en7523 pinctrl driver. Some notes

  • pin number used in gpioX_pins should match with pin number used in PINCTRL_PIN, but
static const int gpio0_pins[] = { 12…
mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-04-27 11:40:47 +00:00
Pinctrl

Is there any official announcement from Airoha? I am working on porting your pinctrl driver to u-boot. From my point of view it's better keep using en7523 name.

mkshevetskiy commented on pull request airoha_en7523/kernel#17 2026-04-27 11:26:03 +00:00
Pinctrl

Hi, what is the reasons of usage "an7523" instead of "en7523" ?