Commit 25476350 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'omap-for-v5.1/cpsw-signed' of...

Merge tag 'omap-for-v5.1/cpsw-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/late

One change to deprecate old CPSW Ethernet PHY mode selection driver

With the device tree changes configuring CPSW with a proper PHY driver,
we want to deprecate the old driver to avoid new users for it.

Note that this driver is based on the related dts changes.

* tag 'omap-for-v5.1/cpsw-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents dc3e1ac1 dba235fa
TI CPSW Phy mode Selection Device Tree Bindings
TI CPSW Phy mode Selection Device Tree Bindings (DEPRECATED)
-----------------------------------------------
Required properties:
......
......@@ -719,6 +719,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \
am335x-cm-t335.dtb \
am335x-evm.dtb \
am335x-evmsk.dtb \
am335x-guardian.dtb \
am335x-icev2.dtb \
am335x-lxm.dtb \
am335x-moxa-uc-2101.dtb \
......
......@@ -72,7 +72,3 @@ &cpsw_emac1 {
dual_emac_res_vlan = <2>;
phy-handle = <&phy1>;
};
&phy_sel {
rmii-clock-ext = <1>;
};
......@@ -114,7 +114,3 @@ &cpsw_emac1 {
dual_emac_res_vlan = <2>;
phy-handle = <&phy1>;
};
&phy_sel {
rmii-clock-ext = <1>;
};
......@@ -133,10 +133,6 @@ &cpsw_emac1 {
phy-handle = <&phy1>;
};
&phy_sel {
rmii-clock-ext = <1>;
};
&dcan1 {
pinctrl-names = "default";
pinctrl-0 = <&dcan1_pins>;
......
......@@ -14,6 +14,10 @@ / {
compatible = "grinn,am335x-chiliboard", "grinn,am335x-chilisom",
"ti,am33xx";
chosen {
stdout-path = &uart0;
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
......@@ -151,10 +155,6 @@ &cpsw_emac0 {
phy-mode = "rmii";
};
&phy_sel {
rmii-clock-ext;
};
/* USB */
&usb {
status = "okay";
......
This diff is collapsed.
......@@ -484,10 +484,6 @@ &mac {
dual_emac;
};
&phy_sel {
rmii-clock-ext;
};
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
......
......@@ -123,10 +123,6 @@ &cpsw_emac1 {
phy-mode = "rmii";
};
&phy_sel {
rmii-clock-ext;
};
&elm {
status = "okay";
};
......
......@@ -328,10 +328,6 @@ &cpsw_emac1 {
dual_emac_res_vlan = <3>;
};
&phy_sel {
rmii-clock-ext;
};
&mac {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
......
......@@ -159,11 +159,6 @@ &cpsw_emac1 {
status = "okay";
};
&phy_sel {
reg= <0x44e10650 0xf5>;
rmii-clock-ext;
};
&sham {
status = "okay";
};
......
......@@ -446,11 +446,6 @@ &cpsw_emac1 {
dual_emac_res_vlan = <2>;
};
&phy_sel {
reg= <0x44e10650 0xf5>;
rmii-clock-ext;
};
&sham {
status = "okay";
};
......
......@@ -100,10 +100,6 @@ &mac {
status = "okay";
};
&phy_sel {
rmii-clock-ext;
};
/* I2C Busses */
&am33xx_pinmux {
i2c0_pins: pinmux_i2c0 {
......
// SPDX-License-Identifier: GPL-2.0
/*
* support for the bosch am335x based shc c3 board
*
* Copyright, C) 2015 Heiko Schocher <hs@denx.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
......
......@@ -279,17 +279,9 @@ scm: scm@0 {
#pinctrl-cells = <1>;
ranges = <0 0 0x2000>;
phy_sel: cpsw-phy-sel@650 {
compatible = "ti,am3352-cpsw-phy-sel";
reg= <0x650 0x4>;
reg-names = "gmii-sel";
};
am33xx_pinmux: pinmux@800 {
compatible = "pinctrl-single";
reg = <0x800 0x238>;
#address-cells = <1>;
#size-cells = <0>;
#pinctrl-cells = <1>;
pinctrl-single,register-width = <32>;
pinctrl-single,function-mask = <0x7f>;
......@@ -302,6 +294,12 @@ scm_conf: scm_conf@0 {
#size-cells = <1>;
ranges = <0 0 0x800>;
phy_gmii_sel: phy-gmii-sel {
compatible = "ti,am3352-phy-gmii-sel";
reg = <0x650 0x4>;
#phy-cells = <2>;
};
scm_clocks: clocks {
#address-cells = <1>;
#size-cells = <0>;
......@@ -717,7 +715,6 @@ mac: ethernet@0 {
interrupts = <40 41 42 43>;
ranges = <0 0 0x8000>;
syscon = <&scm_conf>;
cpsw-phy-sel = <&phy_sel>;
status = "disabled";
davinci_mdio: mdio@1000 {
......@@ -733,11 +730,13 @@ davinci_mdio: mdio@1000 {
cpsw_emac0: slave@200 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 1 1>;
};
cpsw_emac1: slave@300 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 2 1>;
};
};
};
......
......@@ -71,7 +71,7 @@ matrix_keypad: matrix_keypad0 {
pinctrl-0 = <&matrix_keypad_default>;
pinctrl-1 = <&matrix_keypad_sleep>;
linux,wakeup;
wakeup-source;
row-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH /* Bank0, pin3 */
&gpio4 3 GPIO_ACTIVE_HIGH /* Bank4, pin3 */
......
......@@ -280,12 +280,6 @@ scm: scm@0 {
#size-cells = <1>;
ranges = <0 0 0x4000>;
phy_sel: cpsw-phy-sel@650 {
compatible = "ti,am43xx-cpsw-phy-sel";
reg= <0x650 0x4>;
reg-names = "gmii-sel";
};
am43xx_pinmux: pinmux@800 {
compatible = "ti,am437-padconf",
"pinctrl-single";
......@@ -300,11 +294,17 @@ am43xx_pinmux: pinmux@800 {
};
scm_conf: scm_conf@0 {
compatible = "syscon";
compatible = "syscon", "simple-bus";
reg = <0x0 0x800>;
#address-cells = <1>;
#size-cells = <1>;
phy_gmii_sel: phy-gmii-sel {
compatible = "ti,am43xx-phy-gmii-sel";
reg = <0x650 0x4>;
#phy-cells = <2>;
};
scm_clocks: clocks {
#address-cells = <1>;
#size-cells = <0>;
......@@ -555,7 +555,6 @@ GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH
cpts_clock_shift = <29>;
ranges = <0 0 0x8000>;
syscon = <&scm_conf>;
cpsw-phy-sel = <&phy_sel>;
davinci_mdio: mdio@1000 {
compatible = "ti,am4372-mdio","ti,cpsw-mdio","ti,davinci_mdio";
......@@ -572,11 +571,13 @@ davinci_mdio: mdio@1000 {
cpsw_emac0: slave@200 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 1 0>;
};
cpsw_emac1: slave@300 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 2 0>;
};
};
};
......
......@@ -584,10 +584,7 @@ ethphy0: ethernet-phy@16 {
&cpsw_emac0 {
phy-handle = <&ethphy0>;
phy-mode = "rmii";
};
&phy_sel {
rmii-clock-ext;
phys = <&phy_gmii_sel 1 1>;
};
&i2c0 {
......
......@@ -343,6 +343,12 @@ scm_conf: scm_conf@0 {
#size-cells = <1>;
ranges = <0 0 0x800>;
phy_gmii_sel: phy-gmii-sel {
compatible = "ti,dm814-phy-gmii-sel";
reg = <0x650 0x4>;
#phy-cells = <1>;
};
scm_clocks: clocks {
#address-cells = <1>;
#size-cells = <0>;
......@@ -549,17 +555,14 @@ davinci_mdio: mdio@4a100800 {
cpsw_emac0: slave@4a100200 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 1>;
};
cpsw_emac1: slave@4a100300 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
};
phy_sel: cpsw-phy-sel@48140650 {
compatible = "ti,am3352-cpsw-phy-sel";
reg= <0x48140650 0x4>;
reg-names = "gmii-sel";
phys = <&phy_gmii_sel 2>;
};
};
......
......@@ -77,18 +77,18 @@ pbias_mmc_reg: pbias_mmc_omap5 {
};
};
phy_gmii_sel: phy-gmii-sel {
compatible = "ti,dra7xx-phy-gmii-sel";
reg = <0x554 0x4>;
#phy-cells = <1>;
};
scm_conf_clocks: clocks {
#address-cells = <1>;
#size-cells = <0>;
};
};
phy_sel: cpsw-phy-sel@554 {
compatible = "ti,dra7xx-cpsw-phy-sel";
reg= <0x554 0x4>;
reg-names = "gmii-sel";
};
dra7_pmx_core: pinmux@1400 {
compatible = "ti,dra7-padconf",
"pinctrl-single";
......@@ -3099,7 +3099,6 @@ mac: ethernet@0 {
<GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>;
ranges = <0 0 0x4000>;
syscon = <&scm_conf>;
cpsw-phy-sel = <&phy_sel>;
status = "disabled";
davinci_mdio: mdio@1000 {
......@@ -3114,11 +3113,13 @@ davinci_mdio: mdio@1000 {
cpsw_emac0: slave@200 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 1>;
};
cpsw_emac1: slave@300 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 2>;
};
};
};
......
......@@ -122,6 +122,7 @@ &mmc1 {
};
&mmc2 {
interrupts-extended = <&intc 86 &omap3_pmx_core 0x12e>;
vmmc-supply = <&wl12xx_vmmc>;
non-removable;
bus-width = <4>;
......@@ -132,8 +133,10 @@ &mmc2 {
wlcore: wlcore@2 {
compatible = "ti,wl1271";
reg = <2>;
interrupt-parent = <&gpio5>;
interrupts = <21 IRQ_TYPE_EDGE_RISING>; /* gpio 149 */
/* gpio_149 with uart1_rts pad as wakeirq */
interrupts-extended = <&gpio5 21 IRQ_TYPE_EDGE_RISING>,
<&omap3_pmx_core 0x14e>;
interrupt-names = "irq", "wakeup";
ref-clock-frequency = <38400000>;
};
};
......
......@@ -86,6 +86,10 @@ OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_da
OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */
OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */
OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3.sdmmc2_dat3 */
OMAP3_CORE1_IOPAD(0x2164, PIN_OUTPUT | MUX_MODE1) /* sdmmc2_dat4.sdmmc2_dir_dat0 */
OMAP3_CORE1_IOPAD(0x2166, PIN_OUTPUT | MUX_MODE1) /* sdmmc2_dat5.sdmmc2_dir_dat1 */
OMAP3_CORE1_IOPAD(0x2168, PIN_OUTPUT | MUX_MODE1) /* sdmmc2_dat6.sdmmc2_dir_cmd */
OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT | MUX_MODE1) /* sdmmc2_dat7.sdmmc2_clkin */
>;
};
......@@ -127,9 +131,13 @@ OMAP3_CORE1_IOPAD(0x21de, PIN_INPUT_PULLDOWN | MUX_MODE3)
>;
};
/*
* Note that gpio_150 pulled high with internal pull to prevent wlcore
* reset on return from off mode in idle.
*/
wl12xx_gpio: pinmux_wl12xx_gpio {
pinctrl-single,pins = <
OMAP3_CORE1_IOPAD(0x2180, PIN_OUTPUT | MUX_MODE4) /* uart1_cts.gpio_150 */
OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT_PULLUP | MUX_MODE7) /* uart1_cts.gpio_150 */
OMAP3_CORE1_IOPAD(0x217e, PIN_INPUT | MUX_MODE4) /* uart1_rts.gpio_149 */
>;
};
......
......@@ -32,6 +32,14 @@ aliases {
display1 = &tv0;
};
ldo_3v3: fixedregulator {
compatible = "regulator-fixed";
regulator-name = "ldo_3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
/* fixed 26MHz oscillator */
hfclk_26m: oscillator {
#clock-cells = <0>;
......@@ -116,6 +124,7 @@ lcd: td028ttec1@0 {
spi-cpol;
spi-cpha;
backlight= <&backlight>;
label = "lcd";
port {
lcd_in: endpoint {
......@@ -125,7 +134,7 @@ lcd_in: endpoint {
};
};
backlight {
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm11 0 12000000 0>;
pwm-names = "backlight";
......@@ -224,6 +233,15 @@ tv_acbias_devconf1_pins: pinmux_tv_acbias_devconf1_pins {
};
};
&omap3_pmx_wkup {
gpio1_pins: pinmux_gpio1_pins {
pinctrl-single,pins = <
OMAP3_WKUP_IOPAD(0x2a14, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot5.gpio_7 */
OMAP3_WKUP_IOPAD(0x2a1a, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_clkout.gpio_10 */
>;
};
};
&omap3_pmx_core {
pinctrl-names = "default";
pinctrl-0 = <
......@@ -312,6 +330,12 @@ OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE0) /* dss_data23.dss_data23 */
>;
};
gps_pins: pinmux_gps_pins {
pinctrl-single,pins = <
OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* gpio145 */
>;
};
hdq_pins: hdq_pins {
pinctrl-single,pins = <
OMAP3_CORE1_IOPAD(0x21c6, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda.hdq */
......@@ -636,6 +660,11 @@ &twl_keypad {
status = "disabled";
};
&gpio1 {
pinctrl-names = "default";
pinctrl-0 = <&gpio1_pins>;
};
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
......@@ -644,6 +673,14 @@ &uart1 {
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
gnss: gnss {
compatible = "wi2wi,w2sg0004";
pinctrl-names = "default";
pinctrl-0 = <&gps_pins>;
sirf,onoff-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
lna-supply = <&vsim>;
vcc-supply = <&ldo_3v3>;
};
};
&uart3 {
......
......@@ -82,7 +82,7 @@ OMAP3_CORE1_IOPAD(0x2138, PIN_INPUT | MUX_MODE4) /* gpin114 */
/*
* for WL183x module see
* http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
* Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
*/
&wifi_pwrseq {
......
......@@ -359,20 +359,24 @@ &mmc2 {
&mmc3 {
vmmc-supply = <&wl12xx_vmmc>;
/* uart2_tx.sdmmc3_dat1 pad as wakeirq */
interrupts-extended = <&wakeupgen GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH
&omap4_pmx_core 0xde>;
interrupt-names = "irq", "wakeup";
non-removable;
bus-width = <4>;
cap-power-off-card;
keep-power-in-suspend;
#address-cells = <1>;
#size-cells = <0>;
wlcore: wlcore@2 {
compatible = "ti,wl1285", "ti,wl1283";
reg = <2>;
interrupt-parent = <&gpio4>;
interrupts = <4 IRQ_TYPE_EDGE_RISING>; /* gpio100 */
/* gpio_100 with gpmc_wait2 pad as wakeirq */
interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>,
<&omap4_pmx_core 0x4e>;
interrupt-names = "irq", "wakeup";
ref-clock-frequency = <26000000>;
tcxo-clock-frequency = <26000000>;
};
......
......@@ -485,8 +485,10 @@ &mmc5 {
wlcore: wlcore@2 {
compatible = "ti,wl1271";
reg = <2>;
interrupt-parent = <&gpio2>;
interrupts = <21 IRQ_TYPE_EDGE_RISING>; /* gpio 53 */
/* gpio_53 with gpmc_ncs3 pad as wakeup */
interrupts-extended = <&gpio2 21 IRQ_TYPE_EDGE_RISING>,
<&omap4_pmx_core 0x3a>;
interrupt-names = "irq", "wakeup";
ref-clock-frequency = <38400000>;
};
};
......
......@@ -26,6 +26,9 @@ aliases {
};
vdd_eth: fixedregulator-vdd-eth {
pinctrl-names = "default";
pinctrl-0 = <&enet_enable_gpio>;
compatible = "regulator-fixed";
regulator-name = "VDD_ETH";
regulator-min-microvolt = <3300000>;
......@@ -352,6 +355,29 @@ OMAP4_IOPAD(0x150, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat2.sdmmc5_dat2 */
OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */
>;
};
/* gpio_48 for ENET_ENABLE */
enet_enable_gpio: pinmux_enet_enable_gpio {
pinctrl-single,pins = <
OMAP4_IOPAD(0x070, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* gpmc_a24.gpio_48 */
>;
};
ks8851_pins: pinmux_ks8851_pins {
pinctrl-single,pins = <
/* ENET_INT */
OMAP4_IOPAD(0x054, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad10.gpio_34 */
/*
* Misterious pin which makes the ethernet working
* The legacy board file requested this pin on boot
* (ETH_KS8851_QUART) and set it to high, similarly to
* the ENET_ENABLE pin.
* We could use gpio-hog to keep it high, but let's use
* it as a reset GPIO for ks8851.
*/
OMAP4_IOPAD(0x13a, PIN_OUTPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.gpio_138 */
>;
};
};
&i2c1 {
......@@ -452,12 +478,16 @@ &mcspi1 {
pinctrl-0 = <&mcspi1_pins>;
eth@0 {
pinctrl-names = "default";
pinctrl-0 = <&ks8851_pins>;
compatible = "ks8851";
spi-max-frequency = <24000000>;
reg = <0>;
interrupt-parent = <&gpio2>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>; /* gpio line 34 */
vdd-supply = <&vdd_eth>;
reset-gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>;
};
};
......
......@@ -49,10 +49,11 @@ config TI_DAVINCI_CPDMA
will be called davinci_cpdma. This is recommended.
config TI_CPSW_PHY_SEL
bool
bool "TI CPSW Phy mode Selection (DEPRECATED)"
default n
---help---
This driver supports configuring of the phy mode connected to
the CPSW.
the CPSW. DEPRECATED: use PHY_TI_GMII_SEL.
config TI_CPSW_ALE
tristate "TI CPSW ALE Support"
......@@ -64,7 +65,6 @@ config TI_CPSW
depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST
select TI_DAVINCI_CPDMA
select TI_DAVINCI_MDIO
select TI_CPSW_PHY_SEL
select TI_CPSW_ALE
select MFD_SYSCON
select REGMAP
......
......@@ -21,7 +21,13 @@
((mac)[2] << 16) | ((mac)[3] << 24))
#define mac_lo(mac) (((mac)[4] << 0) | ((mac)[5] << 8))
#if IS_ENABLED(CONFIG_TI_CPSW_PHY_SEL)
void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave);
#else
static inline
void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave)
{}
#endif
int ti_cm_get_macid(struct device *dev, int slave, u8 *mac_addr);
#endif /* __CPSW_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment