omap4: panda: convert to device model
Subsystems (3)
cover omap4: panda: convert to device model
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no DM_SPL conversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.
-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH 1/2 omap4: Copy device tree from Linux 5.7.y
Copy all device tree files required for omap4 panda support from mainline Linux.
--- arch/arm/dts/elpida_ecb240abacn.dtsi | 68 + arch/arm/dts/omap4-l4-abe.dtsi | 489 +++++ arch/arm/dts/omap4-l4.dtsi | 2474 ++++++++++++++++++++++++++ arch/arm/dts/omap4-mcpdm.dtsi | 44 + arch/arm/dts/omap4-panda-common.dtsi | 573 ++++++ arch/arm/dts/omap4-panda-es.dts | 82 + arch/arm/dts/omap4-panda.dts | 13 + arch/arm/dts/omap4.dtsi | 657 +++++++ arch/arm/dts/omap443x-clocks.dtsi | 15 + arch/arm/dts/omap443x.dtsi | 76 + arch/arm/dts/omap4460.dtsi | 131 ++ arch/arm/dts/omap446x-clocks.dtsi | 24 + arch/arm/dts/omap44xx-clocks.dtsi | 1324 ++++++++++++++ arch/arm/dts/twl6030.dtsi | 105 ++ arch/arm/dts/twl6030_omap4.dtsi | 35 + include/dt-bindings/clock/omap4.h | 149 ++ 16 files changed, 6259 insertions(+) create mode 100644 arch/arm/dts/elpida_ecb240abacn.dtsi create mode 100644 arch/arm/dts/omap4-l4-abe.dtsi create mode 100644 arch/arm/dts/omap4-l4.dtsi create mode 100644 arch/arm/dts/omap4-mcpdm.dtsi create mode 100644 arch/arm/dts/omap4-panda-common.dtsi create mode 100644 arch/arm/dts/omap4-panda-es.dts create mode 100644 arch/arm/dts/omap4-panda.dts create mode 100644 arch/arm/dts/omap4.dtsi create mode 100644 arch/arm/dts/omap443x-clocks.dtsi create mode 100644 arch/arm/dts/omap443x.dtsi create mode 100644 arch/arm/dts/omap4460.dtsi create mode 100644 arch/arm/dts/omap446x-clocks.dtsi create mode 100644 arch/arm/dts/omap44xx-clocks.dtsi create mode 100644 arch/arm/dts/twl6030.dtsi create mode 100644 arch/arm/dts/twl6030_omap4.dtsi create mode 100644 include/dt-bindings/clock/omap4.h
arch/arm/dts/elpida_ecb240abacn.dtsi new file +68 -0
@@ -0,0 +1,68 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Common devices used in different OMAP boards + */ + +/ { + elpida_ECB240ABACN: lpddr2 { + compatible = "Elpida,ECB240ABACN","jedec,lpddr2-s4"; + density = <2048>; + io-width = <32>; + + tRPab-min-tck = <3>; + tRCD-min-tck = <3>; + tWR-min-tck = <3>; + tRASmin-min-tck = <3>; + tRRD-min-tck = <2>; + tWTR-min-tck = <2>; + tXP-min-tck = <2>; + tRTP-min-tck = <2>; + tCKE-min-tck = <3>; + tCKESR-min-tck = <3>; + tFAW-min-tck = <8>; + + timings_elpida_ECB240ABACN_400mhz: lpddr2-timings at 0 { + compatible = "jedec,lpddr2-timings"; + min-freq = <10000000>; + max-freq = <400000000>; + tRPab = <21000>; + tRCD = <18000>; + tWR = <15000>; + tRAS-min = <42000>; + tRRD = <10000>; + tWTR = <7500>; + tXP = <7500>; + tRTP = <7500>; + tCKESR = <15000>; + tDQSCK-max = <5500>; + tFAW = <50000>; + tZQCS = <90000>; + tZQCL = <360000>; + tZQinit = <1000000>; + tRAS-max-ns = <70000>; + tDQSCK-max-derated = <6000>; + }; + + timings_elpida_ECB240ABACN_200mhz: lpddr2-timings at 1 { + compatible = "jedec,lpddr2-timings"; + min-freq = <10000000>; + max-freq = <200000000>; + tRPab = <21000>; + tRCD = <18000>; + tWR = <15000>; + tRAS-min = <42000>; + tRRD = <10000>; + tWTR = <10000>; + tXP = <7500>; + tRTP = <7500>; + tCKESR = <15000>; + tDQSCK-max = <5500>; + tFAW = <50000>; + tZQCS = <90000>; + tZQCL = <360000>; + tZQinit = <1000000>; + tRAS-max-ns = <70000>; + tDQSCK-max-derated = <6000>; + }; + }; +};
arch/arm/dts/omap4-l4-abe.dtsi new file +489 -0
489 lines not on this page · raw message
arch/arm/dts/omap4-l4.dtsi new file +2474 -0
2,443 lines not on this page · raw message
arch/arm/dts/omap4-mcpdm.dtsi new file +44 -0
44 lines not on this page · raw message
arch/arm/dts/omap4-panda-common.dtsi new file +573 -0
573 lines not on this page · raw message
arch/arm/dts/omap4-panda-es.dts new file +82 -0
82 lines not on this page · raw message
arch/arm/dts/omap4.dtsi new file +657 -0
657 lines not on this page · raw message
arch/arm/dts/omap443x-clocks.dtsi new file +15 -0
Lines of this file are not shown. View the raw message.
arch/arm/dts/omap443x.dtsi new file +76 -0
76 lines not on this page · raw message
arch/arm/dts/omap4460.dtsi new file +131 -0
131 lines not on this page · raw message
arch/arm/dts/omap446x-clocks.dtsi new file +24 -0
Lines of this file are not shown. View the raw message.
arch/arm/dts/omap44xx-clocks.dtsi new file +1324 -0
1,324 lines not on this page · raw message
arch/arm/dts/twl6030.dtsi new file +105 -0
105 lines not on this page · raw message
arch/arm/dts/twl6030_omap4.dtsi new file +35 -0
Lines of this file are not shown. View the raw message.
include/dt-bindings/clock/omap4.h new file +149 -0
149 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 4 lines
2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Part of the diff is not shown here. View the raw message.
PATCH 2/2 omap4: panda: convert to device model
In reply to Tero KristoConvert omap4 panda to device model.
--- arch/arm/dts/Makefile | 4 ++++ arch/arm/dts/omap4-u-boot.dtsi | 39 ++++++++++++++++++++++++++++++++++ board/ti/panda/panda.c | 12 +++++++++++ configs/omap4_panda_defconfig | 8 +++++++ 4 files changed, 63 insertions(+) create mode 100644 arch/arm/dts/omap4-u-boot.dtsi
arch/arm/dts/Makefile +4 -0
@@ -848,6 +848,10 @@ dtb-$(CONFIG_TARGET_OMAP3_BEAGLE) += \ dtb-$(CONFIG_TARGET_OMAP3_IGEP00X0) += \ omap3-igep0020.dtb +dtb-$(CONFIG_TARGET_OMAP4_PANDA) += \ + omap4-panda.dtb \ + omap4-panda-es.dtb + dtb-$(CONFIG_TARGET_SAMA5D2_PTC_EK) += \ at91-sama5d2_ptc_ek.dtb
arch/arm/dts/omap4-u-boot.dtsi new file +39 -0
@@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * U-Boot additions + * + * (C) Copyright 2020 Tero Kristo <[email protected]> + */ + +&l4_cfg { + segment at 0 { + /* SCM Core */ + target-module at 2000 { + compatible = "simple-bus"; + }; + + /* USB HS */ + target-module at 64000 { + compatible = "simple-bus"; + }; + }; +}; + +&l4_per { + segment at 0 { + /* UART3 */ + target-module at 20000 { + compatible = "simple-bus"; + }; + + /* I2C1 */ + target-module at 70000 { + compatible = "simple-bus"; + }; + + /* MMC1 */ + target-module at 9c000 { + compatible = "simple-bus"; + }; + }; +};
board/ti/panda/panda.c +12 -0
@@ -8,6 +8,7 @@#include <init.h> #include <log.h> #include <net.h> +#include <serial.h> #include <asm/mach-types.h> #include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h>
@@ -55,6 +56,17 @@ int board_init(void)return 0 ; } +#if defined(CONFIG_SPL_OS_BOOT ) +int spl_start_uboot (void ) +{ +/* break into full u-boot on 'c' */ +if (serial_tstc () &&serial_getc () =='c' ) +return 1 ; + +return 0 ; +} +#endif /* CONFIG_SPL_OS_BOOT */ +int board_eth_init (bd_t *bis) {return 0 ;
configs/omap4_panda_defconfig +8 -0
@@ -2,12 +2,14 @@ CONFIG_ARM=y CONFIG_ARCH_OMAP2PLUS=y CONFIG_OMAP44XX=y CONFIG_TARGET_OMAP4_PANDA=y +CONFIG_DEFAULT_DEVICE_TREE="omap4-panda" CONFIG_SPL=y CONFIG_SPL_TEXT_BASE=0x40300000 CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd" CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_INFO_QUIET=y +CONFIG_DEFAULT_FDT_FILE="omap4-panda.dtb" CONFIG_VERSION_VARIABLE=y # CONFIG_SPL_FS_EXT4 is not set # CONFIG_SPL_I2C_SUPPORT is not set
@@ -23,16 +25,20 @@ CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_EXT4_WRITE=y +CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_DM=y +CONFIG_DM_MMC=y CONFIG_MMC_OMAP_HS=y CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_OMAP3_SPI=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y
@@ -40,3 +46,5 @@ CONFIG_USB_GADGET=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_OF_LIBFDT=y +CONFIG_SYS_MALLOC_F_LEN=0x4000 +CONFIG_DM_ETH=y
Signature · 4 lines
2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH 2/2 omap4: panda: convert to device model
Quoted 5 lines · Tero Kristo
Convert omap4 panda to device model.
Signed-off-by Tero Kristo <[email protected]>---
cover omap4: panda: convert to device model
In reply to Tero KristoQuoted 11 lines · Tero Kristo
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no
DM_SPLconversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.-Tero
Thanks, OpenBSD still boots on PandaBoard ES with these changes.
USB Ethernet does not seem to work before your patches on 2020.04
"Net: No ethernet found."
-U-Boot SPL 2020.04 (May 26 2020 - 09:37:17 -0600)
+U-Boot SPL 2020.07-rc3-00212-g83e9328144 (Jun 06 2020 - 17:18:39 +1000)
OMAP4460-GP ES1.1
Trying to boot from MMC1
-SPL: Please implement spl_start_uboot() for your board -SPL: Direct Linux boot not active!
+spl_load_image_fat_os: error reading image args, err - -2
-U-Boot 2020.04 (May 26 2020 - 09:37:17 -0600)
+U-Boot 2020.07-rc3-00212-g83e9328144 (Jun 06 2020 - 17:18:39 +1000)
CPU : OMAP4460-GP ES1.1
+Model: TI OMAP4 PandaBoard
Board: OMAP4 Panda
I2C: ready
DRAM: 1 GiB
@@ -23,67 +23,58 @@ SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
-83524 bytes read in 6 ms (13.3 MiB/s)
+83524 bytes read in 32 ms (2.5 MiB/s)
Found EFI removable media binary efi/boot/bootarm.efi
-Scanning disks on usb...
-Disk usb0 not ready
-Disk usb1 not ready
-Disk usb2 not ready
-Disk usb3 not ready
-Scanning disks on mmc...
+Scanning disk mmc at 0.blk...
** Unrecognized filesystem type **
-MMC Device 1 not found
-MMC Device 2 not found
-MMC Device 3 not found
-Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
-105448 bytes read in 11 ms (9.1 MiB/s) +105448 bytes read in 45 ms (2.2 MiB/s)
disks: sd0*
Quoted 1 line
Quoted 1 line
OpenBSD/armv7 BOOTARM 1.15
boot>
-booting sd0a:/bsd: 4689044+688008+252268+562848-[254389+120+324848+288747]=0x0 +booting sd0a:/bsd: 4695860+688940+255424+565064\[254202+120+324848+288747]=0x0
OpenBSD/armv7 booting ...
U-Boot SPL 2020.07-rc3-00212-g83e9328144 (Jun 06 2020 - 17:18:39 +1000) OMAP4460-GP ES1.1
Trying to boot from MMC1spl_load_image_fat_os: error reading image args, err - -2
U-Boot 2020.07-rc3-00212-g83e9328144 (Jun 06 2020 - 17:18:39 +1000)
CPU : OMAP4460-GP ES1.1 Model: TI OMAP4 PandaBoard Board: OMAP4 Panda I2C: ready DRAM: 1 GiB MMC: OMAP SD/MMC: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment
Net: No ethernet found. Hit any key to stop autoboot: 0
## Error: "init_console" not defined
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
83524 bytes read in 32 ms (2.5 MiB/s)
Found EFI removable media binary efi/boot/bootarm.efi Scanning disk mmc at 0.blk...
** Unrecognized filesystem type **
BootOrder not defined
EFI boot manager: Cannot load any image 105448 bytes read in 45 ms (2.2 MiB/s)
disks: sd0*
Quoted 1 line
Quoted 1 line
OpenBSD/armv7 BOOTARM 1.15
boot>
booting sd0a:/bsd: 4695860+688940+255424+565064\[254202+120+324848+288747]=0x0
OpenBSD/armv7 booting ...
cover omap4: panda: convert to device model
In reply to Tero KristoHi Tero,
Quoted 9 lines · Tero Kristo
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no
DM_SPLconversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.
I see the below warning with these patches:
board/ti/panda/panda.c:329:35: warning: ?struct ehci_hcor? declared inside parameter list will not be visible outside of this definition or declaration
329 | struct ehci_hccr **hccr, struct ehci_hcor **hcor)
| ^~~~~~~~~board/ti/panda/panda.c:329:10: warning: ?struct ehci_hccr? declared inside parameter list will not be visible outside of this definition or declaration
329 | struct ehci_hccr **hccr, struct ehci_hcor **hcor)
| ^~~~~~~~~
board/ti/panda/panda.c: In function ?ehci_hcd_init?:
board/ti/panda/panda.c:339:8: warning: implicit declaration of function ?omap_ehci_hcd_init?; did you mean ?ehci_hcd_init?? [-Wimplicit-function-declaration]
339 | ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor);
| ^~~~~~~~~~~~~~~~~~
| ehci_hcd_init
board/ti/panda/panda.c: In function ?ehci_hcd_stop?:
board/ti/panda/panda.c:348:9: warning: implicit declaration of function ?omap_ehci_hcd_stop?; did you mean ?ehci_hcd_stop?? [-Wimplicit-function-declaration]
348 | return omap_ehci_hcd_stop();
| ^~~~~~~~~~~~~~~~~~
| ehci_hcd_stopThanks and regards,
Lokesh
Quoted 7 lines
-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
cover omap4: panda: convert to device model
Quoted 20 lines · Lokesh Vutla
Hi Tero,
Quoted 9 lines · Tero Kristo
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no
DM_SPLconversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.I see the below warning with these patches:
board/ti/panda/panda.c:329:35: warning: ?structehci_hcor? declared inside parameter list will not be visible outside of this definition or declaration
329 | structehci_hccr**hccr, structehci_hcor**hcor)
| ^~~~~~~~~board/ti/panda/panda.c:329:10: warning: ?structehci_hccr? declared inside parameter list will not be visible outside of this definition or declaration
329 | structehci_hccr**hccr, structehci_hcor**hcor)
Quoted 11 lines
| ^~~~~~~~~
board/ti/panda/panda.c: In function ?ehci_hcd_init?:
board/ti/panda/panda.c:339:8: warning: implicit declaration of function ?omap_ehci_hcd_init?; did you mean ?ehci_hcd_init?? [-Wimplicit-function-declaration]
339 | ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor);
| ^~~~~~~~~~~~~~~~~~
| ehci_hcd_init
board/ti/panda/panda.c: In function ?ehci_hcd_stop?:
board/ti/panda/panda.c:348:9: warning: implicit declaration of function ?omap_ehci_hcd_stop?; did you mean ?ehci_hcd_stop?? [-Wimplicit-function-declaration]
348 | return omap_ehci_hcd_stop();
| ^~~~~~~~~~~~~~~~~~
| ehci_hcd_stopYeah, I actually see these also. I think we could maybe drop all the offending code as I did later with the omap5-uevm. On omap5, USB seemed to work even without these.
Maybe some USB expert can comment on these (Vignesh)?
-Tero
Quoted 12 lines
Thanks and regards,
LokeshQuoted 6 lines
-Tero
--
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
cover omap4: panda: convert to device model
Quoted 41 lines · Tero Kristo
Quoted 32 lines · Lokesh Vutla
Hi Tero,
Quoted 9 lines · Tero Kristo
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no
DM_SPLconversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.I see the below warning with these patches:
board/ti/panda/panda.c:329:35: warning: ?structehci_hcor? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |?????????????????????????????????? ^~~~~~~~~board/ti/panda/panda.c:329:10: warning: ?structehci_hccr? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |????????? ^~~~~~~~~board/ti/panda/panda.c: In function ?ehci_hcd_init?:board/ti/panda/panda.c:339:8: warning: implicit declaration of function ?omap_ehci_hcd_init?; did you mean ?ehci_hcd_init?? [-Wimplicit-function-declaration]?? 339 |? ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); ?????? |??????? ^~~~~~~~~~~~~~~~~~ ?????? |??????? ehci_hcd_initQuoted 7 lines
board/ti/panda/panda.c: In function ?ehci_hcd_stop?:board/ti/panda/panda.c:348:9: warning: implicit declaration of function ?omap_ehci_hcd_stop?; did you mean ?ehci_hcd_stop?? [-Wimplicit-function-declaration]?? 348 |? return omap_ehci_hcd_stop(); ?????? |???????? ^~~~~~~~~~~~~~~~~~ ?????? |???????? ehci_hcd_stop
Quoted 6 lines
Yeah, I actually see these also. I think we could maybe drop all the offending code as I did later with the omap5-uevm. On omap5, USB seemed to work even without these.
Maybe some USB expert can comment on these (Vignesh)?
Offending code won't compile with DM_USB enabled. I suggest to drop them for now in order to avoid entire board support from being dropped. USB can be added back later if needed...
Or you would have to disable DM_USB give this a try..
Regards
Vignesh
Quoted 18 lines
-Tero
Quoted 12 lines
Thanks and regards,
LokeshQuoted 6 lines
-Tero
Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
cover omap4: panda: convert to device model
Quoted 52 lines · Vignesh Raghavendra
Quoted 41 lines · Tero Kristo
Quoted 32 lines · Lokesh Vutla
Hi Tero,
Quoted 9 lines · Tero Kristo
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no
DM_SPLconversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.I see the below warning with these patches:
board/ti/panda/panda.c:329:35: warning: ?structehci_hcor? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |?????????????????????????????????? ^~~~~~~~~board/ti/panda/panda.c:329:10: warning: ?structehci_hccr? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |????????? ^~~~~~~~~board/ti/panda/panda.c: In function ?ehci_hcd_init?:board/ti/panda/panda.c:339:8: warning: implicit declaration of function ?omap_ehci_hcd_init?; did you mean ?ehci_hcd_init?? [-Wimplicit-function-declaration]?? 339 |? ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); ?????? |??????? ^~~~~~~~~~~~~~~~~~ ?????? |??????? ehci_hcd_initQuoted 7 lines
board/ti/panda/panda.c: In function ?ehci_hcd_stop?:board/ti/panda/panda.c:348:9: warning: implicit declaration of function ?omap_ehci_hcd_stop?; did you mean ?ehci_hcd_stop?? [-Wimplicit-function-declaration]?? 348 |? return omap_ehci_hcd_stop(); ?????? |???????? ^~~~~~~~~~~~~~~~~~ ?????? |???????? ehci_hcd_stopQuoted 6 lines
Yeah, I actually see these also. I think we could maybe drop all the offending code as I did later with the omap5-uevm. On omap5, USB seemed to work even without these.
Maybe some USB expert can comment on these (Vignesh)?
Quoted 5 lines
Offending code won't compile with
DM_USBenabled. I suggest to drop them for now in order to avoid entire board support from being dropped. USB can be added back later if needed...Or you would have to disable
DM_USBgive this a try..
Yeah, dropping DM_USB USB stops working completely I believe. And, USB appears working (at least partially: usb start, usb info provides some sane data) with these two patches, just the compiler warnings are there.
However, I eliminated the offending code in v2 I posted today, and USB still appears functional as far as I can see. Trying to compile mass storage support in to test USB mass storage devices causes a mayhem so I left that for someone more experienced with USB.
-Tero
Quoted 20 lines
Regards
VigneshQuoted 16 lines
-Tero
Quoted 12 lines
Thanks and regards,
LokeshQuoted 6 lines
-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
cover omap4: panda: convert to device model
Quoted 59 lines · Tero Kristo
Quoted 52 lines · Vignesh Raghavendra
Quoted 41 lines · Tero Kristo
Quoted 32 lines · Lokesh Vutla
Hi Tero,
Quoted 9 lines · Tero Kristo
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no
DM_SPLconversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.I see the below warning with these patches:
board/ti/panda/panda.c:329:35: warning: ?structehci_hcor? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |?????????????????????????????????? ^~~~~~~~~board/ti/panda/panda.c:329:10: warning: ?structehci_hccr? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |????????? ^~~~~~~~~board/ti/panda/panda.c: In function ?ehci_hcd_init?:board/ti/panda/panda.c:339:8: warning: implicit declaration of function ?omap_ehci_hcd_init?; did you mean ?ehci_hcd_init?? [-Wimplicit-function-declaration]?? 339 |? ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); ?????? |??????? ^~~~~~~~~~~~~~~~~~ ?????? |??????? ehci_hcd_initQuoted 7 lines
board/ti/panda/panda.c: In function ?ehci_hcd_stop?:board/ti/panda/panda.c:348:9: warning: implicit declaration of function ?omap_ehci_hcd_stop?; did you mean ?ehci_hcd_stop?? [-Wimplicit-function-declaration]?? 348 |? return omap_ehci_hcd_stop(); ?????? |???????? ^~~~~~~~~~~~~~~~~~ ?????? |???????? ehci_hcd_stopQuoted 6 lines
Yeah, I actually see these also. I think we could maybe drop all the offending code as I did later with the omap5-uevm. On omap5, USB seemed to work even without these.
Maybe some USB expert can comment on these (Vignesh)?
Quoted 5 lines
Offending code won't compile with
DM_USBenabled. I suggest to drop them for now in order to avoid entire board support from being dropped. USB can be added back later if needed...Or you would have to disable
DM_USBgive this a try..
Quoted 8 lines
Yeah, dropping
DM_USBUSB stops working completely I believe. And, USB appears working (at least partially: usb start, usb info provides some sane data) with these two patches, just the compiler warnings are there.However, I eliminated the offending code in v2 I posted today, and USB still appears functional as far as I can see. Trying to compile mass storage support in to test USB mass storage devices causes a mayhem so I left that for someone more experienced with USB.
Please note that DM_USB migration also has a deadline of almost a year ago so this is another area to fix or remove-now-readd-later. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200615/17e6c322/attachment.sig>
cover omap4: panda: convert to device model
Quoted 64 lines · Tom Rini
Quoted 63 lines · Tero Kristo
Quoted 52 lines · Vignesh Raghavendra
Quoted 41 lines · Tero Kristo
Quoted 32 lines · Lokesh Vutla
Hi Tero,
Quoted 9 lines · Tero Kristo
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no
DM_SPLconversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.I see the below warning with these patches:
board/ti/panda/panda.c:329:35: warning: ?structehci_hcor? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |?????????????????????????????????? ^~~~~~~~~board/ti/panda/panda.c:329:10: warning: ?structehci_hccr? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |????????? ^~~~~~~~~board/ti/panda/panda.c: In function ?ehci_hcd_init?:board/ti/panda/panda.c:339:8: warning: implicit declaration of function ?omap_ehci_hcd_init?; did you mean ?ehci_hcd_init?? [-Wimplicit-function-declaration]?? 339 |? ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); ?????? |??????? ^~~~~~~~~~~~~~~~~~ ?????? |??????? ehci_hcd_initQuoted 7 lines
board/ti/panda/panda.c: In function ?ehci_hcd_stop?:board/ti/panda/panda.c:348:9: warning: implicit declaration of function ?omap_ehci_hcd_stop?; did you mean ?ehci_hcd_stop?? [-Wimplicit-function-declaration]?? 348 |? return omap_ehci_hcd_stop(); ?????? |???????? ^~~~~~~~~~~~~~~~~~ ?????? |???????? ehci_hcd_stopQuoted 6 lines
Yeah, I actually see these also. I think we could maybe drop all the offending code as I did later with the omap5-uevm. On omap5, USB seemed to work even without these.
Maybe some USB expert can comment on these (Vignesh)?
Quoted 5 lines
Offending code won't compile with
DM_USBenabled. I suggest to drop them for now in order to avoid entire board support from being dropped. USB can be added back later if needed...Or you would have to disable
DM_USBgive this a try..Yeah, dropping
DM_USBUSB stops working completely I believe. And, USB appears working (at least partially: usb start, usb info provides some sane data) with these two patches, just the compiler warnings are there.
Quoted 8 lines
Quoted 4 lines
However, I eliminated the offending code in v2 I posted today, and USB still appears functional as far as I can see. Trying to compile mass storage support in to test USB mass storage devices causes a mayhem so I left that for someone more experienced with USB.
Please note that
DM_USBmigration also has a deadline of almost a year ago so this is another area to fix or remove-now-readd-later. Thanks!
Yeah, so with these patches, building u-boot for omap4 panda does not complain about any DM_xyz conversion deadlines anymore, does it mean we are clean? :)
-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
cover omap4: panda: convert to device model
Quoted 70 lines · Tero Kristo
Quoted 69 lines · Tom Rini
Quoted 67 lines · Tero Kristo
Quoted 52 lines · Vignesh Raghavendra
Quoted 41 lines · Tero Kristo
Quoted 32 lines · Lokesh Vutla
Hi Tero,
Quoted 9 lines · Tero Kristo
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no
DM_SPLconversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.I see the below warning with these patches:
board/ti/panda/panda.c:329:35: warning: ?structehci_hcor? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |?????????????????????????????????? ^~~~~~~~~board/ti/panda/panda.c:329:10: warning: ?structehci_hccr? declared inside parameter list will not be visible outside of this definition or declaration
?? 329 |?? structehci_hccr**hccr, structehci_hcor**hcor) ?????? |????????? ^~~~~~~~~board/ti/panda/panda.c: In function ?ehci_hcd_init?:board/ti/panda/panda.c:339:8: warning: implicit declaration of function ?omap_ehci_hcd_init?; did you mean ?ehci_hcd_init?? [-Wimplicit-function-declaration]?? 339 |? ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); ?????? |??????? ^~~~~~~~~~~~~~~~~~ ?????? |??????? ehci_hcd_initQuoted 7 lines
board/ti/panda/panda.c: In function ?ehci_hcd_stop?:board/ti/panda/panda.c:348:9: warning: implicit declaration of function ?omap_ehci_hcd_stop?; did you mean ?ehci_hcd_stop?? [-Wimplicit-function-declaration]?? 348 |? return omap_ehci_hcd_stop(); ?????? |???????? ^~~~~~~~~~~~~~~~~~ ?????? |???????? ehci_hcd_stopQuoted 6 lines
Yeah, I actually see these also. I think we could maybe drop all the offending code as I did later with the omap5-uevm. On omap5, USB seemed to work even without these.
Maybe some USB expert can comment on these (Vignesh)?
Quoted 5 lines
Offending code won't compile with
DM_USBenabled. I suggest to drop them for now in order to avoid entire board support from being dropped. USB can be added back later if needed...Or you would have to disable
DM_USBgive this a try..Yeah, dropping
DM_USBUSB stops working completely I believe. And, USB appears working (at least partially: usb start, usb info provides some sane data) with these two patches, just the compiler warnings are there.However, I eliminated the offending code in v2 I posted today, and USB still appears functional as far as I can see. Trying to compile mass storage support in to test USB mass storage devices causes a mayhem so I left that for someone more experienced with USB.
Quoted 7 lines
Quoted 3 lines
Please note that
DM_USBmigration also has a deadline of almost a year ago so this is another area to fix or remove-now-readd-later. Thanks!Yeah, so with these patches, building u-boot for omap4 panda does not complain about any
DM_xyzconversion deadlines anymore, does it mean we are clean? :)
Not quite as you're not dealing with DM_SPI but that's calling make's warning and not echo'ing like everything else so it's easier to miss.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200615/db8e545e/attachment.sig>
cover omap4: panda: convert to device model
In reply to Tero KristoQuoted 60 lines · Tero Kristo
Quoted 52 lines · Vignesh Raghavendra
Quoted 41 lines · Tero Kristo
Quoted 32 lines · Lokesh Vutla
Hi Tero,
Quoted 9 lines · Tero Kristo
Hi,
As there is looming death to OMAP4 Panda board u-boot support, I decided to take a shot and convert it to device model myself. With these patches it boots up fine, and there are no
DM_SPLconversion complaints during compile time anymore. I think USB ethernet does not work anymore with this, but its better than dropping the support for the board completely. USB itself appears working, so it should be relatively easy for someone to fix the networking support if they need it.I see the below warning with these patches:
board/ti/panda/panda.c:329:35: warning: ?structehci_hcor? declared inside parameter list will not be visible outside of this definition or declaration
329 | structehci_hccr**hccr, structehci_hcor**hcor)
| ^~~~~~~~~board/ti/panda/panda.c:329:10: warning: ?structehci_hccr? declared inside parameter list will not be visible outside of this definition or declaration
329 | structehci_hccr**hccr, structehci_hcor**hcor)
| ^~~~~~~~~board/ti/panda/panda.c: In function ?ehci_hcd_init?:board/ti/panda/panda.c:339:8: warning: implicit declaration of function ?omap_ehci_hcd_init?; did you mean ?ehci_hcd_init?? [-Wimplicit-function-declaration]339 | ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); | ^~~~~~~~~~~~~~~~~~ | ehci_hcd_initQuoted 7 lines
board/ti/panda/panda.c: In function ?ehci_hcd_stop?:board/ti/panda/panda.c:348:9: warning: implicit declaration of function ?omap_ehci_hcd_stop?; did you mean ?ehci_hcd_stop?? [-Wimplicit-function-declaration]348 | return omap_ehci_hcd_stop(); | ^~~~~~~~~~~~~~~~~~ | ehci_hcd_stopQuoted 6 lines
Yeah, I actually see these also. I think we could maybe drop all the offending code as I did later with the omap5-uevm. On omap5, USB seemed to work even without these.
Maybe some USB expert can comment on these (Vignesh)?
Quoted 5 lines
Offending code won't compile with
DM_USBenabled. I suggest to drop them for now in order to avoid entire board support from being dropped. USB can be added back later if needed...Or you would have to disable
DM_USBgive this a try..
Quoted 8 lines
Yeah, dropping
DM_USBUSB stops working completely I believe. And, USB appears working (at least partially: usb start, usb info provides some sane data) with these two patches, just the compiler warnings are there.However, I eliminated the offending code in v2 I posted today, and USB still appears functional as far as I can see. Trying to compile mass storage support in to test USB mass storage devices causes a mayhem so I left that for someone more experienced with USB.
I am not an expert at USB by any stretch of the imagination, but spent a fair amount of time trying to port the omap-ehci and usbhs-host drivers to work on the am3517-evm and the omap3_logic_somlv boards. I don't know how different omap3 and omap4 ehci and ushhs-host drivers are, but their device tree notes are similar. If you poke around the code for the am3517-evm, or have one laying around somewhere, I would expect the EHCI controller to be able to enumerate and mount a mass storage device. Using the aM3517 might help getting the omap4 USB stuff working.
adam
Quoted 26 lines
-Tero
Quoted 20 lines
Regards
VigneshQuoted 16 lines
-Tero
Quoted 12 lines
Thanks and regards,
LokeshQuoted 6 lines
-Tero
--
--
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki