Replies: 1 comment 1 reply
-
I don't understand. You want to write a driver, but you reference an existing driver. Why do you want to write one if one exists? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I would like to write a driver for Marvell 88E6321/88E6320 Switch which is found here in linux kernel https://github.com/torvalds/linux/blob/0326074ff4652329f2a1a9c8685104576bd8d131/drivers/net/dsa/mv88e6xxx/chip.c.
The protocol I have to use to communicate with the device is MDIO which also known as SMI.
We are doing all the device initialization with the resistors - the driver is needed for reading statistics and more.
Our board has NXP RT1061 controller and we will access marvell switch via enet2 peripheral.
enet2 pinctrl:
pinmux_enet2: pinmux_enet2 {
group0 {
pinmux = <&iomuxc_gpio_emc_35_enet2_rx_data0>,
<&iomuxc_gpio_emc_37_enet2_rx_en>,
<&iomuxc_gpio_emc_34_enet2_rx_er>;
drive-strength = "r0-5";
bias-pull-down;
bias-pull-down-value = "100k";
slew-rate = "fast";
nxp,speed = "200-mhz";
};
group1 {
pinmux = <&iomuxc_gpio_emc_36_enet2_rx_data1>;
drive-strength = "r0-5";
bias-pull-up;
bias-pull-up-value = "22k";
slew-rate = "fast";
nxp,speed = "200-mhz";
};
group2 {
pinmux = <&iomuxc_gpio_emc_30_enet2_tx_data0>,
<&iomuxc_gpio_emc_31_enet2_tx_data1>,
<&iomuxc_gpio_emc_32_enet2_tx_en>,
<&iomuxc_gpio_emc_38_enet2_mdc>,
<&iomuxc_gpio_emc_39_enet2_mdio>;
drive-strength = "r0-6";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
group3 {
pinmux = <&iomuxc_gpio_emc_33_enet2_ref_clk2>;
drive-strength = "r0-6";
slew-rate = "slow";
nxp,speed = "100-mhz";
input-enable;
};
};
our dts declaration:
/* Marvell Switch */
&enet2 {
status = "okay";
pinctrl-0 = <&pinmux_enet2>;
pinctrl-names = "default";
phy-addr = <0>;
};
Thanks in advance,
Ofir.
Beta Was this translation helpful? Give feedback.
All reactions