Re: [PATCH] ARM: stm32: Switch DHSOM to FMC2 EBI driver
Hi, On 8/23/22 19:27, Marek Vasut wrote: Perform long overdue conversion of ad-hoc FMC2 EBI bus initialization to upstream FMC2 EBI driver. No functional change. Signed-off-by: Marek Vasut Cc: Patrice Chotard Cc: Patrick Delaunay --- .../dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi | 8 --- arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi| 14 - .../stm32mp15xx-dhcor-drc-compact-u-boot.dtsi | 16 -- board/dhelectronics/dh_stm32mp1/board.c | 52 --- configs/stm32mp15_dhcom_basic_defconfig | 1 + configs/stm32mp15_dhcor_basic_defconfig | 1 + 6 files changed, 2 insertions(+), 90 deletions(-) Applied to u-boot-stm/master, thanks! Regards Patrick
Re: [PATCH] ARM: stm32: Switch DHSOM to FMC2 EBI driver
Hi, On 8/23/22 19:27, Marek Vasut wrote: Perform long overdue conversion of ad-hoc FMC2 EBI bus initialization to upstream FMC2 EBI driver. No functional change. Signed-off-by: Marek Vasut Cc: Patrice Chotard Cc: Patrick Delaunay --- .../dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi | 8 --- arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi| 14 - .../stm32mp15xx-dhcor-drc-compact-u-boot.dtsi | 16 -- board/dhelectronics/dh_stm32mp1/board.c | 52 --- configs/stm32mp15_dhcom_basic_defconfig | 1 + configs/stm32mp15_dhcor_basic_defconfig | 1 + 6 files changed, 2 insertions(+), 90 deletions(-) Reviewed-by: Patrick Delaunay Thanks Patrick
Re: [PATCH] ARM: stm32: Switch DHSOM to FMC2 EBI driver
Hi Marek On 8/23/22 19:27, Marek Vasut wrote: > Perform long overdue conversion of ad-hoc FMC2 EBI bus initialization > to upstream FMC2 EBI driver. No functional change. > > Signed-off-by: Marek Vasut > Cc: Patrice Chotard > Cc: Patrick Delaunay > --- > .../dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi | 8 --- > arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi| 14 - > .../stm32mp15xx-dhcor-drc-compact-u-boot.dtsi | 16 -- > board/dhelectronics/dh_stm32mp1/board.c | 52 --- > configs/stm32mp15_dhcom_basic_defconfig | 1 + > configs/stm32mp15_dhcor_basic_defconfig | 1 + > 6 files changed, 2 insertions(+), 90 deletions(-) > > diff --git a/arch/arm/dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi > b/arch/arm/dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi > index 5bc6698f87f..0bcaec50198 100644 > --- a/arch/arm/dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi > +++ b/arch/arm/dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi > @@ -5,14 +5,6 @@ > > #include "stm32mp15xx-dhcom-u-boot.dtsi" > > -/ { > - aliases { > - /delete-property/ ethernet1; > - }; > -}; > - > -/delete-node/ &ks8851; > - > &usbotg_hs { > dr_mode = "peripheral"; > }; > diff --git a/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi > b/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi > index ee747a52bb7..8a7156c93bf 100644 > --- a/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi > +++ b/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi > @@ -9,8 +9,6 @@ > #include "stm32mp15-ddr3-dhsom-2x2Gb-1066-binG.dtsi" > #include "stm32mp15-ddr3-dhsom-2x4Gb-1066-binG.dtsi" > > -/delete-node/ &ksz8851; > - > / { > aliases { > i2c1 = &i2c2; > @@ -21,7 +19,6 @@ > spi0 = &qspi; > usb0 = &usbotg_hs; > eeprom0 = &eeprom0; > - ethernet1 = &ks8851; > }; > > config { > @@ -30,12 +27,6 @@ > dh,som-coding-gpios = <&gpiof 12 0>, <&gpiof 13 0>, <&gpiof 15 > 0>; > dh,ddr3-coding-gpios = <&gpioz 6 0>, <&gpioz 7 0>; > }; > - > - /* This is actually on FMC2, but we do not have bus driver for that */ > - ks8851: ks8851mll@6400 { > - compatible = "micrel,ks8851-mll"; > - reg = <0x6400 0x2>; > - }; > }; > > ðernet0 { > @@ -74,11 +65,6 @@ > }; > > &pinctrl { > - /* These should bound to FMC2 bus driver, but we do not have one */ > - pinctrl-0 = <&fmc_pins_b &mco2_pins_a>; > - pinctrl-1 = <&fmc_sleep_pins_b &mco2_sleep_pins_a>; > - pinctrl-names = "default", "sleep"; > - > mco2_pins_a: mco2-0 { > pins { > pinmux = ; /* MCO2 */ > diff --git a/arch/arm/dts/stm32mp15xx-dhcor-drc-compact-u-boot.dtsi > b/arch/arm/dts/stm32mp15xx-dhcor-drc-compact-u-boot.dtsi > index 407fed56167..b6a6a78647a 100644 > --- a/arch/arm/dts/stm32mp15xx-dhcor-drc-compact-u-boot.dtsi > +++ b/arch/arm/dts/stm32mp15xx-dhcor-drc-compact-u-boot.dtsi > @@ -5,25 +5,16 @@ > > #include "stm32mp15xx-dhcor-u-boot.dtsi" > > -/delete-node/ &ksz8851; > - > / { > aliases { > mmc0 = &sdmmc1; > mmc1 = &sdmmc2; > usb0 = &usbotg_hs; > - ethernet1 = &ks8851; > }; > > config { > dh,board-coding-gpios = <&gpioh 9 0>, <&gpioh 8 0>, <&gpioh 3 > 0>; > }; > - > - /* This is actually on FMC2, but we do not have bus driver for that */ > - ks8851: ks8851mll@6400 { > - compatible = "micrel,ks8851-mll"; > - reg = <0x6400 0x2>; > - }; > }; > > ðernet0 { > @@ -38,13 +29,6 @@ > }; > }; > > -&pinctrl { > - /* These should bound to FMC2 bus driver, but we do not have one */ > - pinctrl-0 = <&fmc_pins_b>; > - pinctrl-1 = <&fmc_sleep_pins_b>; > - pinctrl-names = "default", "sleep"; > -}; > - > &sdmmc1 { > u-boot,dm-spl; > st,use-ckin; > diff --git a/board/dhelectronics/dh_stm32mp1/board.c > b/board/dhelectronics/dh_stm32mp1/board.c > index e3c7ed10492..9188f5381eb 100644 > --- a/board/dhelectronics/dh_stm32mp1/board.c > +++ b/board/dhelectronics/dh_stm32mp1/board.c > @@ -527,56 +527,6 @@ static void sysconf_init(void) > #endif > } > > -static void board_init_fmc2(void) > -{ > -#define STM32_FMC2_BCR1 0x0 > -#define STM32_FMC2_BTR1 0x4 > -#define STM32_FMC2_BWTR1 0x104 > -#define STM32_FMC2_BCR(x)((x) * 0x8 + STM32_FMC2_BCR1) > -#define STM32_FMC2_BCRx_FMCENBIT(31) > -#define STM32_FMC2_BCRx_WREN BIT(12) > -#define STM32_FMC2_BCRx_RSVD BIT(7) > -#define STM32_FMC2_BCRx_FACCEN BIT(6) > -#define STM32_FMC2_BCRx_MWID(n) ((n) << 4) > -#define STReviewed-by: Patrice Chotard > M32_FMC2_BCRx_MTYP(n)((n) << 2) > -#define STM32_FMC2_BCRx_MUXENBIT(1) > -#define STM32_FMC2_BCRx_MBKENBIT(0) > -#define STM32_FMC2_BTR(x)
[PATCH] ARM: stm32: Switch DHSOM to FMC2 EBI driver
Perform long overdue conversion of ad-hoc FMC2 EBI bus initialization to upstream FMC2 EBI driver. No functional change. Signed-off-by: Marek Vasut Cc: Patrice Chotard Cc: Patrick Delaunay --- .../dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi | 8 --- arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi| 14 - .../stm32mp15xx-dhcor-drc-compact-u-boot.dtsi | 16 -- board/dhelectronics/dh_stm32mp1/board.c | 52 --- configs/stm32mp15_dhcom_basic_defconfig | 1 + configs/stm32mp15_dhcor_basic_defconfig | 1 + 6 files changed, 2 insertions(+), 90 deletions(-) diff --git a/arch/arm/dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi b/arch/arm/dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi index 5bc6698f87f..0bcaec50198 100644 --- a/arch/arm/dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi +++ b/arch/arm/dts/stm32mp15xx-dhcom-picoitx-u-boot.dtsi @@ -5,14 +5,6 @@ #include "stm32mp15xx-dhcom-u-boot.dtsi" -/ { - aliases { - /delete-property/ ethernet1; - }; -}; - -/delete-node/ &ks8851; - &usbotg_hs { dr_mode = "peripheral"; }; diff --git a/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi b/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi index ee747a52bb7..8a7156c93bf 100644 --- a/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi +++ b/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi @@ -9,8 +9,6 @@ #include "stm32mp15-ddr3-dhsom-2x2Gb-1066-binG.dtsi" #include "stm32mp15-ddr3-dhsom-2x4Gb-1066-binG.dtsi" -/delete-node/ &ksz8851; - / { aliases { i2c1 = &i2c2; @@ -21,7 +19,6 @@ spi0 = &qspi; usb0 = &usbotg_hs; eeprom0 = &eeprom0; - ethernet1 = &ks8851; }; config { @@ -30,12 +27,6 @@ dh,som-coding-gpios = <&gpiof 12 0>, <&gpiof 13 0>, <&gpiof 15 0>; dh,ddr3-coding-gpios = <&gpioz 6 0>, <&gpioz 7 0>; }; - - /* This is actually on FMC2, but we do not have bus driver for that */ - ks8851: ks8851mll@6400 { - compatible = "micrel,ks8851-mll"; - reg = <0x6400 0x2>; - }; }; ðernet0 { @@ -74,11 +65,6 @@ }; &pinctrl { - /* These should bound to FMC2 bus driver, but we do not have one */ - pinctrl-0 = <&fmc_pins_b &mco2_pins_a>; - pinctrl-1 = <&fmc_sleep_pins_b &mco2_sleep_pins_a>; - pinctrl-names = "default", "sleep"; - mco2_pins_a: mco2-0 { pins { pinmux = ; /* MCO2 */ diff --git a/arch/arm/dts/stm32mp15xx-dhcor-drc-compact-u-boot.dtsi b/arch/arm/dts/stm32mp15xx-dhcor-drc-compact-u-boot.dtsi index 407fed56167..b6a6a78647a 100644 --- a/arch/arm/dts/stm32mp15xx-dhcor-drc-compact-u-boot.dtsi +++ b/arch/arm/dts/stm32mp15xx-dhcor-drc-compact-u-boot.dtsi @@ -5,25 +5,16 @@ #include "stm32mp15xx-dhcor-u-boot.dtsi" -/delete-node/ &ksz8851; - / { aliases { mmc0 = &sdmmc1; mmc1 = &sdmmc2; usb0 = &usbotg_hs; - ethernet1 = &ks8851; }; config { dh,board-coding-gpios = <&gpioh 9 0>, <&gpioh 8 0>, <&gpioh 3 0>; }; - - /* This is actually on FMC2, but we do not have bus driver for that */ - ks8851: ks8851mll@6400 { - compatible = "micrel,ks8851-mll"; - reg = <0x6400 0x2>; - }; }; ðernet0 { @@ -38,13 +29,6 @@ }; }; -&pinctrl { - /* These should bound to FMC2 bus driver, but we do not have one */ - pinctrl-0 = <&fmc_pins_b>; - pinctrl-1 = <&fmc_sleep_pins_b>; - pinctrl-names = "default", "sleep"; -}; - &sdmmc1 { u-boot,dm-spl; st,use-ckin; diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c index e3c7ed10492..9188f5381eb 100644 --- a/board/dhelectronics/dh_stm32mp1/board.c +++ b/board/dhelectronics/dh_stm32mp1/board.c @@ -527,56 +527,6 @@ static void sysconf_init(void) #endif } -static void board_init_fmc2(void) -{ -#define STM32_FMC2_BCR10x0 -#define STM32_FMC2_BTR10x4 -#define STM32_FMC2_BWTR1 0x104 -#define STM32_FMC2_BCR(x) ((x) * 0x8 + STM32_FMC2_BCR1) -#define STM32_FMC2_BCRx_FMCEN BIT(31) -#define STM32_FMC2_BCRx_WREN BIT(12) -#define STM32_FMC2_BCRx_RSVD BIT(7) -#define STM32_FMC2_BCRx_FACCEN BIT(6) -#define STM32_FMC2_BCRx_MWID(n)((n) << 4) -#define STM32_FMC2_BCRx_MTYP(n)((n) << 2) -#define STM32_FMC2_BCRx_MUXEN BIT(1) -#define STM32_FMC2_BCRx_MBKEN BIT(0) -#define STM32_FMC2_BTR(x) ((x) * 0x8 + STM32_FMC2_BTR1) -#define STM32_FMC2_BTRx_DATAHLD(n) ((n) << 30) -#define STM32_FMC2_BTRx_BUSTURN(n) ((n) << 16) -#define STM32_FMC2_BTRx_DATAST(n) ((n) << 8) -#define STM32_FMC2_BTRx_ADDHLD(n) ((n) << 4) -#define STM32_FMC2_BTRx_ADDSET(n) ((n) << 0) - -