drivers/net/mdio/fwnode_mdio.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
When the reset gpio is defined within the node of the device tree
describing the PHY, the reset is initialized and managed only after
calling the fwnode_mdiobus_phy_device_register function.
However, before calling it, the MDIO communication is checked by the
get_phy_device function.
When this happen and the reset GPIO was somehow previously set down,
the get_phy_device function fails, preventing the PHY detection.
These changes force the deassert of the MDIO reset signal before
checking the MDIO channel.
The PHY may require a minimum deassert time before being responsive:
use a reasonable sleep time after forcing the deassert of the MDIO
reset signal.
Once done, free the gpio descriptor to allow managing it later.
Signed-off-by: Pierluigi Passaro <pierluigi.p@variscite.com>
Signed-off-by: FrancescoFerraro <francesco.f@variscite.com>
---
drivers/net/mdio/fwnode_mdio.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c
index b782c35c4ac1..1f4b8c4c1f60 100644
--- a/drivers/net/mdio/fwnode_mdio.c
+++ b/drivers/net/mdio/fwnode_mdio.c
@@ -8,6 +8,8 @@
#include <linux/acpi.h>
#include <linux/fwnode_mdio.h>
+#include <linux/gpio/consumer.h>
+#include <linux/gpio/driver.h>
#include <linux/of.h>
#include <linux/phy.h>
#include <linux/pse-pd/pse.h>
@@ -118,6 +120,8 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
bool is_c45 = false;
u32 phy_id;
int rc;
+ int reset_deassert_delay = 0;
+ struct gpio_desc *reset_gpio;
psec = fwnode_find_pse_control(child);
if (IS_ERR(psec))
@@ -134,10 +138,31 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
if (rc >= 0)
is_c45 = true;
+ reset_gpio = fwnode_gpiod_get_index(child, "reset", 0, GPIOD_OUT_LOW, "PHY reset");
+ if (reset_gpio == ERR_PTR(-EPROBE_DEFER)) {
+ dev_dbg(&bus->dev, "reset signal for PHY@%u not ready\n", addr);
+ return -EPROBE_DEFER;
+ } else if (IS_ERR(reset_gpio)) {
+ if (reset_gpio == ERR_PTR(-ENOENT))
+ dev_dbg(&bus->dev, "reset signal for PHY@%u not defined\n", addr);
+ else
+ dev_dbg(&bus->dev, "failed to request reset for PHY@%u, error %ld\n", addr, PTR_ERR(reset_gpio));
+ reset_gpio = NULL;
+ } else {
+ dev_dbg(&bus->dev, "deassert reset signal for PHY@%u\n", addr);
+ fwnode_property_read_u32(child, "reset-deassert-us",
+ &reset_deassert_delay);
+ if (reset_deassert_delay)
+ fsleep(reset_deassert_delay);
+ }
+
if (is_c45 || fwnode_get_phy_id(child, &phy_id))
phy = get_phy_device(bus, addr, is_c45);
else
phy = phy_device_create(bus, addr, phy_id, 0, NULL);
+
+ gpiochip_free_own_desc(reset_gpio);
+
if (IS_ERR(phy)) {
rc = PTR_ERR(phy);
goto clean_mii_ts;
--
2.37.2
Hi Pierluigi, https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Pierluigi-Passaro/net-mdio-force-deassert-MDIO-reset-signal/20230116-001044 patch link: https://lore.kernel.org/r/20230115161006.16431-1-pierluigi.p%40variscite.com patch subject: [PATCH] net: mdio: force deassert MDIO reset signal config: xtensa-randconfig-m041-20230116 compiler: xtensa-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Reported-by: Dan Carpenter <error27@gmail.com> smatch warnings: drivers/net/mdio/fwnode_mdio.c:144 fwnode_mdiobus_register_phy() warn: missing unwind goto? vim +144 drivers/net/mdio/fwnode_mdio.c bc1bee3b87ee48 Calvin Johnson 2021-06-11 114 int fwnode_mdiobus_register_phy(struct mii_bus *bus, bc1bee3b87ee48 Calvin Johnson 2021-06-11 115 struct fwnode_handle *child, u32 addr) bc1bee3b87ee48 Calvin Johnson 2021-06-11 116 { bc1bee3b87ee48 Calvin Johnson 2021-06-11 117 struct mii_timestamper *mii_ts = NULL; 5e82147de1cbd7 Oleksij Rempel 2022-10-03 118 struct pse_control *psec = NULL; bc1bee3b87ee48 Calvin Johnson 2021-06-11 119 struct phy_device *phy; bc1bee3b87ee48 Calvin Johnson 2021-06-11 120 bool is_c45 = false; bc1bee3b87ee48 Calvin Johnson 2021-06-11 121 u32 phy_id; bc1bee3b87ee48 Calvin Johnson 2021-06-11 122 int rc; 3f08f04af6947d Pierluigi Passaro 2023-01-15 123 int reset_deassert_delay = 0; 3f08f04af6947d Pierluigi Passaro 2023-01-15 124 struct gpio_desc *reset_gpio; bc1bee3b87ee48 Calvin Johnson 2021-06-11 125 5e82147de1cbd7 Oleksij Rempel 2022-10-03 126 psec = fwnode_find_pse_control(child); 5e82147de1cbd7 Oleksij Rempel 2022-10-03 127 if (IS_ERR(psec)) 5e82147de1cbd7 Oleksij Rempel 2022-10-03 128 return PTR_ERR(psec); 5e82147de1cbd7 Oleksij Rempel 2022-10-03 129 bc1bee3b87ee48 Calvin Johnson 2021-06-11 130 mii_ts = fwnode_find_mii_timestamper(child); 5e82147de1cbd7 Oleksij Rempel 2022-10-03 131 if (IS_ERR(mii_ts)) { 5e82147de1cbd7 Oleksij Rempel 2022-10-03 132 rc = PTR_ERR(mii_ts); 5e82147de1cbd7 Oleksij Rempel 2022-10-03 133 goto clean_pse; ^^^^^^^^^^^^^^^ 5e82147de1cbd7 Oleksij Rempel 2022-10-03 134 } bc1bee3b87ee48 Calvin Johnson 2021-06-11 135 bc1bee3b87ee48 Calvin Johnson 2021-06-11 136 rc = fwnode_property_match_string(child, "compatible", bc1bee3b87ee48 Calvin Johnson 2021-06-11 137 "ethernet-phy-ieee802.3-c45"); bc1bee3b87ee48 Calvin Johnson 2021-06-11 138 if (rc >= 0) bc1bee3b87ee48 Calvin Johnson 2021-06-11 139 is_c45 = true; bc1bee3b87ee48 Calvin Johnson 2021-06-11 140 3f08f04af6947d Pierluigi Passaro 2023-01-15 141 reset_gpio = fwnode_gpiod_get_index(child, "reset", 0, GPIOD_OUT_LOW, "PHY reset"); 3f08f04af6947d Pierluigi Passaro 2023-01-15 142 if (reset_gpio == ERR_PTR(-EPROBE_DEFER)) { 3f08f04af6947d Pierluigi Passaro 2023-01-15 143 dev_dbg(&bus->dev, "reset signal for PHY@%u not ready\n", addr); 3f08f04af6947d Pierluigi Passaro 2023-01-15 @144 return -EPROBE_DEFER; ^^^^^^^^^^^^^^^^^^^^ Looks like there needs to be some clean up done before the return. (Sometimes the kbuild-bot doesn't include the whole function in these emails. I'm not sure what the rules are.). -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests
Hi Pierluigi, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] [also build test ERROR on net/master linus/master v6.2-rc4 next-20230116] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Pierluigi-Passaro/net-mdio-force-deassert-MDIO-reset-signal/20230116-001044 patch link: https://lore.kernel.org/r/20230115161006.16431-1-pierluigi.p%40variscite.com patch subject: [PATCH] net: mdio: force deassert MDIO reset signal config: nios2-defconfig compiler: nios2-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/3f08f04af6947d4fce17b11443001c4e386ca66e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Pierluigi-Passaro/net-mdio-force-deassert-MDIO-reset-signal/20230116-001044 git checkout 3f08f04af6947d4fce17b11443001c4e386ca66e # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): nios2-linux-ld: drivers/net/mdio/fwnode_mdio.o: in function `fwnode_mdiobus_register_phy': >> drivers/net/mdio/fwnode_mdio.c:164: undefined reference to `gpiochip_free_own_desc' drivers/net/mdio/fwnode_mdio.c:164:(.text+0x230): relocation truncated to fit: R_NIOS2_CALL26 against `gpiochip_free_own_desc' vim +164 drivers/net/mdio/fwnode_mdio.c 113 114 int fwnode_mdiobus_register_phy(struct mii_bus *bus, 115 struct fwnode_handle *child, u32 addr) 116 { 117 struct mii_timestamper *mii_ts = NULL; 118 struct pse_control *psec = NULL; 119 struct phy_device *phy; 120 bool is_c45 = false; 121 u32 phy_id; 122 int rc; 123 int reset_deassert_delay = 0; 124 struct gpio_desc *reset_gpio; 125 126 psec = fwnode_find_pse_control(child); 127 if (IS_ERR(psec)) 128 return PTR_ERR(psec); 129 130 mii_ts = fwnode_find_mii_timestamper(child); 131 if (IS_ERR(mii_ts)) { 132 rc = PTR_ERR(mii_ts); 133 goto clean_pse; 134 } 135 136 rc = fwnode_property_match_string(child, "compatible", 137 "ethernet-phy-ieee802.3-c45"); 138 if (rc >= 0) 139 is_c45 = true; 140 141 reset_gpio = fwnode_gpiod_get_index(child, "reset", 0, GPIOD_OUT_LOW, "PHY reset"); 142 if (reset_gpio == ERR_PTR(-EPROBE_DEFER)) { 143 dev_dbg(&bus->dev, "reset signal for PHY@%u not ready\n", addr); 144 return -EPROBE_DEFER; 145 } else if (IS_ERR(reset_gpio)) { 146 if (reset_gpio == ERR_PTR(-ENOENT)) 147 dev_dbg(&bus->dev, "reset signal for PHY@%u not defined\n", addr); 148 else 149 dev_dbg(&bus->dev, "failed to request reset for PHY@%u, error %ld\n", addr, PTR_ERR(reset_gpio)); 150 reset_gpio = NULL; 151 } else { 152 dev_dbg(&bus->dev, "deassert reset signal for PHY@%u\n", addr); 153 fwnode_property_read_u32(child, "reset-deassert-us", 154 &reset_deassert_delay); 155 if (reset_deassert_delay) 156 fsleep(reset_deassert_delay); 157 } 158 159 if (is_c45 || fwnode_get_phy_id(child, &phy_id)) 160 phy = get_phy_device(bus, addr, is_c45); 161 else 162 phy = phy_device_create(bus, addr, phy_id, 0, NULL); 163 > 164 gpiochip_free_own_desc(reset_gpio); -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests # # Automatically generated file; DO NOT EDIT. # Linux/nios2 6.2.0-rc3 Kernel Configuration # CONFIG_CC_VERSION_TEXT="nios2-linux-gcc (GCC) 12.1.0" CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=120100 CONFIG_CLANG_VERSION=0 CONFIG_AS_IS_GNU=y CONFIG_AS_VERSION=23800 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=23800 CONFIG_LLD_VERSION=0 CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y CONFIG_CC_HAS_ASM_INLINE=y CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y CONFIG_PAHOLE_VERSION=123 CONFIG_IRQ_WORK=y # # General setup # CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 # CONFIG_COMPILE_TEST is not set # CONFIG_WERROR is not set CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_BUILD_SALT="" CONFIG_DEFAULT_INIT="" CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_WATCH_QUEUE is not set CONFIG_CROSS_MEMORY_ATTACH=y # CONFIG_USELIB is not set # CONFIG_AUDIT is not set # # IRQ subsystem # CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_IRQ_DOMAIN=y CONFIG_SPARSE_IRQ=y # CONFIG_GENERIC_IRQ_DEBUGFS is not set # end of IRQ subsystem CONFIG_GENERIC_CLOCKEVENTS=y # # Timers subsystem # CONFIG_TICK_ONESHOT=y CONFIG_NO_HZ_COMMON=y # CONFIG_HZ_PERIODIC is not set CONFIG_NO_HZ_IDLE=y # CONFIG_NO_HZ is not set # CONFIG_HIGH_RES_TIMERS is not set # end of Timers subsystem CONFIG_BPF=y # # BPF subsystem # # CONFIG_BPF_SYSCALL is not set # end of BPF subsystem CONFIG_PREEMPT_NONE_BUILD=y CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set # # CPU/Task time and stats accounting # CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set # CONFIG_TASKSTATS is not set # CONFIG_PSI is not set # end of CPU/Task time and stats accounting # # RCU Subsystem # CONFIG_TINY_RCU=y # CONFIG_RCU_EXPERT is not set CONFIG_SRCU=y CONFIG_TINY_SRCU=y # end of RCU Subsystem # CONFIG_IKCONFIG is not set # CONFIG_IKHEADERS is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 # CONFIG_PRINTK_INDEX is not set # # Scheduler features # # end of Scheduler features CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" CONFIG_GCC11_NO_ARRAY_BOUNDS=y CONFIG_GCC12_NO_ARRAY_BOUNDS=y CONFIG_CC_NO_ARRAY_BOUNDS=y # CONFIG_CGROUPS is not set # CONFIG_NAMESPACES is not set # CONFIG_CHECKPOINT_RESTORE is not set # CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set # CONFIG_BLK_DEV_INITRD is not set # CONFIG_BOOT_CONFIG is not set CONFIG_INITRAMFS_PRESERVE_MTIME=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=y CONFIG_EXPERT=y CONFIG_MULTIUSER=y # CONFIG_SGETMASK_SYSCALL is not set CONFIG_SYSFS_SYSCALL=y CONFIG_FHANDLE=y CONFIG_POSIX_TIMERS=y CONFIG_PRINTK=y CONFIG_BUG=y # CONFIG_ELF_CORE is not set CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_FUTEX_PI=y # CONFIG_EPOLL is not set # CONFIG_SIGNALFD is not set # CONFIG_TIMERFD is not set # CONFIG_EVENTFD is not set # CONFIG_SHMEM is not set # CONFIG_AIO is not set CONFIG_IO_URING=y CONFIG_ADVISE_SYSCALLS=y CONFIG_MEMBARRIER=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_SELFTEST is not set # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_BASE_RELATIVE=y # CONFIG_KCMP is not set CONFIG_EMBEDDED=y # CONFIG_PC104 is not set # # Kernel Performance Events And Counters # # end of Kernel Performance Events And Counters # CONFIG_PROFILING is not set # end of General setup CONFIG_NIOS2=y CONFIG_GENERIC_CSUM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_NO_IOPORT_MAP=y # # Kernel features # # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_HZ_300 is not set # CONFIG_HZ_1000 is not set CONFIG_HZ=250 CONFIG_ARCH_FORCE_MAX_ORDER=11 # end of Kernel features # # Platform options # # # Memory settings # CONFIG_NIOS2_MEM_BASE=0x10000000 # # Device tree # # CONFIG_NIOS2_DTB_AT_PHYS_ADDR is not set # CONFIG_NIOS2_DTB_SOURCE_BOOL is not set # # Nios II instructions # CONFIG_NIOS2_ARCH_REVISION=1 CONFIG_NIOS2_HW_MUL_SUPPORT=y # CONFIG_NIOS2_HW_MULX_SUPPORT is not set CONFIG_NIOS2_HW_DIV_SUPPORT=y # CONFIG_NIOS2_FPU_SUPPORT is not set # CONFIG_NIOS2_CI_SWAB_SUPPORT is not set CONFIG_NIOS2_CI_SWAB_NO=0 # # Cache settings # CONFIG_CUSTOM_CACHE_SETTINGS=y CONFIG_NIOS2_DCACHE_SIZE=0x8000 CONFIG_NIOS2_DCACHE_LINE_SIZE=0x20 CONFIG_NIOS2_ICACHE_SIZE=0x8000 # end of Platform options # # Processor type and features # CONFIG_MMU=y CONFIG_NR_CPUS=1 CONFIG_NIOS2_ALIGNMENT_TRAP=y # # Boot options # CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="" # CONFIG_CMDLINE_FORCE is not set # CONFIG_NIOS2_CMDLINE_IGNORE_DTB is not set CONFIG_NIOS2_PASS_CMDLINE=y CONFIG_NIOS2_BOOT_LINK_OFFSET=0x00800000 # end of Processor type and features # # Advanced setup # # CONFIG_ADVANCED_OPTIONS is not set # # Default settings for advanced configuration options are used # CONFIG_NIOS2_KERNEL_MMU_REGION_BASE=0x80000000 CONFIG_NIOS2_KERNEL_REGION_BASE=0xc0000000 CONFIG_NIOS2_IO_REGION_BASE=0xe0000000 # end of Advanced setup # # General architecture-dependent options # CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_ARCH_HAS_DMA_SET_UNCACHED=y CONFIG_ARCH_32BIT_OFF_T=y CONFIG_MMU_GATHER_NO_RANGE=y CONFIG_MMU_GATHER_MERGE_VMAS=y CONFIG_LTO_NONE=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_COMPAT_32BIT_TIME=y CONFIG_CPU_NO_EFFICIENT_FFS=y # CONFIG_LOCK_EVENT_COUNTS is not set # # GCOV-based kernel profiling # # CONFIG_GCOV_KERNEL is not set # end of GCOV-based kernel profiling CONFIG_FUNCTION_ALIGNMENT=0 # end of General architecture-dependent options CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y # CONFIG_MODULE_FORCE_LOAD is not set CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set # CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_MODULE_SIG is not set CONFIG_MODULE_COMPRESS_NONE=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set # CONFIG_MODULE_COMPRESS_ZSTD is not set # CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set CONFIG_MODPROBE_PATH="/sbin/modprobe" # CONFIG_TRIM_UNUSED_KSYMS is not set CONFIG_BLOCK=y CONFIG_BLOCK_LEGACY_AUTOLOAD=y # CONFIG_BLK_DEV_BSGLIB is not set # CONFIG_BLK_DEV_INTEGRITY is not set # CONFIG_BLK_DEV_ZONED is not set # CONFIG_BLK_WBT is not set CONFIG_BLK_DEBUG_FS=y # CONFIG_BLK_SED_OPAL is not set # CONFIG_BLK_INLINE_ENCRYPTION is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y CONFIG_EFI_PARTITION=y # end of Partition Types # # IO Schedulers # CONFIG_MQ_IOSCHED_DEADLINE=y CONFIG_MQ_IOSCHED_KYBER=y # CONFIG_IOSCHED_BFQ is not set # end of IO Schedulers CONFIG_INLINE_SPIN_UNLOCK_IRQ=y CONFIG_INLINE_READ_UNLOCK=y CONFIG_INLINE_READ_UNLOCK_IRQ=y CONFIG_INLINE_WRITE_UNLOCK=y CONFIG_INLINE_WRITE_UNLOCK_IRQ=y # # Executable file formats # CONFIG_BINFMT_ELF=y CONFIG_ELFCORE=y CONFIG_BINFMT_SCRIPT=y # CONFIG_BINFMT_MISC is not set CONFIG_COREDUMP=y # end of Executable file formats # # Memory Management options # CONFIG_ARCH_NO_SWAP=y # # SLAB allocator options # CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB_DEPRECATED is not set CONFIG_SLAB_MERGE_DEFAULT=y # CONFIG_SLAB_FREELIST_RANDOM is not set # CONFIG_SLAB_FREELIST_HARDENED is not set # end of SLAB allocator options # CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set CONFIG_COMPAT_BRK=y CONFIG_FLATMEM=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_COMPACTION=y CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 # CONFIG_PAGE_REPORTING is not set CONFIG_MIGRATION=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_NEED_PER_CPU_KM=y # CONFIG_CMA is not set # CONFIG_IDLE_PAGE_TRACKING is not set CONFIG_VM_EVENT_COUNTERS=y # CONFIG_PERCPU_STATS is not set # CONFIG_GUP_TEST is not set # CONFIG_ANON_VMA_NAME is not set # CONFIG_USERFAULTFD is not set # CONFIG_LRU_GEN is not set # # Data Access Monitoring # # CONFIG_DAMON is not set # end of Data Access Monitoring # end of Memory Management options CONFIG_NET=y CONFIG_SKB_EXTENSIONS=y # # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_DIAG is not set CONFIG_UNIX=y CONFIG_UNIX_SCM=y CONFIG_AF_UNIX_OOB=y # CONFIG_UNIX_DIAG is not set # CONFIG_TLS is not set # CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y CONFIG_IP_PNP_RARP=y # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE_DEMUX is not set # CONFIG_IP_MROUTE is not set # CONFIG_SYN_COOKIES is not set # CONFIG_NET_IPVTI is not set # CONFIG_NET_FOU is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set CONFIG_INET_TABLE_PERTURB_ORDER=16 CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_INET_UDP_DIAG is not set # CONFIG_INET_RAW_DIAG is not set # CONFIG_INET_DIAG_DESTROY is not set # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set # CONFIG_IPV6 is not set CONFIG_MPTCP=y CONFIG_INET_MPTCP_DIAG=y # CONFIG_NETWORK_SECMARK is not set CONFIG_NET_PTP_CLASSIFY=y # CONFIG_NETWORK_PHY_TIMESTAMPING is not set # CONFIG_NETFILTER is not set # CONFIG_BPFILTER is not set # CONFIG_IP_DCCP is not set # CONFIG_IP_SCTP is not set # CONFIG_RDS is not set # CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_L2TP is not set # CONFIG_BRIDGE is not set # CONFIG_NET_DSA is not set # CONFIG_VLAN_8021Q is not set # CONFIG_LLC2 is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_PHONET is not set # CONFIG_IEEE802154 is not set # CONFIG_NET_SCHED is not set # CONFIG_DCB is not set # CONFIG_BATMAN_ADV is not set # CONFIG_OPENVSWITCH is not set # CONFIG_VSOCKETS is not set # CONFIG_NETLINK_DIAG is not set # CONFIG_MPLS is not set # CONFIG_NET_NSH is not set # CONFIG_HSR is not set # CONFIG_NET_SWITCHDEV is not set # CONFIG_NET_L3_MASTER_DEV is not set # CONFIG_QRTR is not set # CONFIG_NET_NCSI is not set CONFIG_NET_RX_BUSY_POLL=y CONFIG_BQL=y # # Network testing # # CONFIG_NET_PKTGEN is not set # end of Network testing # end of Networking options # CONFIG_HAMRADIO is not set # CONFIG_CAN is not set # CONFIG_BT is not set # CONFIG_AF_RXRPC is not set # CONFIG_AF_KCM is not set # CONFIG_MCTP is not set # CONFIG_WIRELESS is not set # CONFIG_RFKILL is not set # CONFIG_NET_9P is not set # CONFIG_CAIF is not set # CONFIG_CEPH_LIB is not set # CONFIG_NFC is not set # CONFIG_PSAMPLE is not set # CONFIG_NET_IFE is not set # CONFIG_LWTUNNEL is not set CONFIG_NET_SELFTESTS=y # CONFIG_FAILOVER is not set CONFIG_ETHTOOL_NETLINK=y # # Device Drivers # # CONFIG_PCCARD is not set # # Generic Driver Options # # CONFIG_UEVENT_HELPER is not set CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_DEVTMPFS_SAFE is not set CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # # Firmware loader # # CONFIG_FW_LOADER is not set # end of Firmware loader CONFIG_ALLOW_DEV_COREDUMP=y # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set # CONFIG_TEST_ASYNC_DRIVER_PROBE is not set CONFIG_GENERIC_CPU_DEVICES=y CONFIG_SOC_BUS=y # end of Generic Driver Options # # Bus devices # # CONFIG_MHI_BUS is not set # CONFIG_MHI_BUS_EP is not set # end of Bus devices # CONFIG_CONNECTOR is not set # # Firmware Drivers # # # ARM System Control and Management Interface Protocol # # end of ARM System Control and Management Interface Protocol # CONFIG_FIRMWARE_MEMMAP is not set # CONFIG_GOOGLE_FIRMWARE is not set # # Tegra firmware driver # # end of Tegra firmware driver # end of Firmware Drivers # CONFIG_GNSS is not set CONFIG_MTD=y # CONFIG_MTD_TESTS is not set # # Partition parsers # # CONFIG_MTD_AR7_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_OF_PARTS=y # CONFIG_MTD_REDBOOT_PARTS is not set # end of Partition parsers # # User Modules And Translation Layers # CONFIG_MTD_BLKDEVS=y CONFIG_MTD_BLOCK=y # # Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK. # # CONFIG_FTL is not set # CONFIG_NFTL is not set # CONFIG_INFTL is not set # CONFIG_RFD_FTL is not set # CONFIG_SSFDC is not set # CONFIG_SM_FTL is not set # CONFIG_MTD_OOPS is not set # CONFIG_MTD_PARTITIONED_MASTER is not set # # RAM/ROM/Flash chip drivers # CONFIG_MTD_CFI=y # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_AMDSTD=y # CONFIG_MTD_CFI_STAA is not set CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set # end of RAM/ROM/Flash chip drivers # # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_PLATRAM is not set # end of Mapping drivers for chip access # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers # # CONFIG_MTD_DOCG3 is not set # end of Self-contained MTD device drivers # # NAND # # CONFIG_MTD_ONENAND is not set # CONFIG_MTD_RAW_NAND is not set # # ECC engine support # # CONFIG_MTD_NAND_ECC_SW_HAMMING is not set # CONFIG_MTD_NAND_ECC_SW_BCH is not set # CONFIG_MTD_NAND_ECC_MXIC is not set # end of ECC engine support # end of NAND # # LPDDR & LPDDR2 PCM memory drivers # # CONFIG_MTD_LPDDR is not set # end of LPDDR & LPDDR2 PCM memory drivers # CONFIG_MTD_UBI is not set # CONFIG_MTD_HYPERBUS is not set CONFIG_DTC=y CONFIG_OF=y # CONFIG_OF_UNITTEST is not set CONFIG_OF_FLATTREE=y CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_KOBJ=y CONFIG_OF_ADDRESS=y CONFIG_OF_IRQ=y CONFIG_OF_RESERVED_MEM=y # CONFIG_OF_OVERLAY is not set # CONFIG_PARPORT is not set CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_NULL_BLK is not set CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 # CONFIG_BLK_DEV_DRBD is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_ATA_OVER_ETH is not set # CONFIG_BLK_DEV_RBD is not set # CONFIG_BLK_DEV_UBLK is not set # # NVME Support # # CONFIG_NVME_FC is not set # CONFIG_NVME_TCP is not set # end of NVME Support # # Misc devices # # CONFIG_DUMMY_IRQ is not set # CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_SRAM is not set # CONFIG_XILINX_SDFEC is not set # CONFIG_OPEN_DICE is not set # CONFIG_VCPU_STALL_DETECTOR is not set # CONFIG_C2PORT is not set # # EEPROM support # # CONFIG_EEPROM_93CX6 is not set # end of EEPROM support # # Texas Instruments shared transport line discipline # # end of Texas Instruments shared transport line discipline # # Altera FPGA firmware download module (requires I2C) # # CONFIG_ECHO is not set # CONFIG_PVPANIC is not set # end of Misc devices # # SCSI device support # CONFIG_SCSI_MOD=y # CONFIG_RAID_ATTRS is not set # CONFIG_SCSI is not set # end of SCSI device support # CONFIG_ATA is not set # CONFIG_MD is not set # CONFIG_TARGET_CORE is not set CONFIG_NETDEVICES=y CONFIG_NET_CORE=y # CONFIG_BONDING is not set # CONFIG_DUMMY is not set # CONFIG_WIREGUARD is not set # CONFIG_EQUALIZER is not set # CONFIG_NET_TEAM is not set # CONFIG_MACVLAN is not set # CONFIG_IPVLAN is not set # CONFIG_VXLAN is not set # CONFIG_GENEVE is not set # CONFIG_BAREUDP is not set # CONFIG_GTP is not set # CONFIG_AMT is not set # CONFIG_MACSEC is not set # CONFIG_NETCONSOLE is not set # CONFIG_TUN is not set # CONFIG_TUN_VNET_CROSS_LE is not set # CONFIG_VETH is not set # CONFIG_NLMON is not set CONFIG_ETHERNET=y CONFIG_NET_VENDOR_ALACRITECH=y CONFIG_ALTERA_TSE=y CONFIG_NET_VENDOR_AMAZON=y CONFIG_NET_VENDOR_AQUANTIA=y CONFIG_NET_VENDOR_ARC=y CONFIG_NET_VENDOR_ASIX=y CONFIG_NET_VENDOR_BROADCOM=y # CONFIG_B44 is not set # CONFIG_BCMGENET is not set # CONFIG_SYSTEMPORT is not set CONFIG_NET_VENDOR_CADENCE=y # CONFIG_MACB is not set CONFIG_NET_VENDOR_CAVIUM=y CONFIG_NET_VENDOR_CORTINA=y # CONFIG_GEMINI_ETHERNET is not set CONFIG_NET_VENDOR_DAVICOM=y # CONFIG_DM9000 is not set # CONFIG_DNET is not set CONFIG_NET_VENDOR_ENGLEDER=y # CONFIG_TSNEP is not set CONFIG_NET_VENDOR_EZCHIP=y # CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set CONFIG_NET_VENDOR_FUNGIBLE=y CONFIG_NET_VENDOR_GOOGLE=y CONFIG_NET_VENDOR_HUAWEI=y CONFIG_NET_VENDOR_I825XX=y CONFIG_NET_VENDOR_INTEL=y CONFIG_NET_VENDOR_WANGXUN=y CONFIG_NET_VENDOR_LITEX=y # CONFIG_LITEX_LITEETH is not set CONFIG_NET_VENDOR_MARVELL=y # CONFIG_MVMDIO is not set CONFIG_NET_VENDOR_MICREL=y # CONFIG_KS8851_MLL is not set CONFIG_NET_VENDOR_MICROCHIP=y # CONFIG_VCAP is not set CONFIG_NET_VENDOR_MICROSEMI=y CONFIG_NET_VENDOR_MICROSOFT=y CONFIG_NET_VENDOR_NI=y # CONFIG_NI_XGE_MANAGEMENT_ENET is not set CONFIG_NET_VENDOR_NATSEMI=y CONFIG_NET_VENDOR_NETRONOME=y CONFIG_NET_VENDOR_8390=y # CONFIG_ETHOC is not set CONFIG_NET_VENDOR_PENSANDO=y CONFIG_NET_VENDOR_QUALCOMM=y # CONFIG_QCOM_EMAC is not set # CONFIG_RMNET is not set CONFIG_NET_VENDOR_RENESAS=y CONFIG_NET_VENDOR_ROCKER=y CONFIG_NET_VENDOR_SAMSUNG=y # CONFIG_SXGBE_ETH is not set CONFIG_NET_VENDOR_SEEQ=y CONFIG_NET_VENDOR_SOLARFLARE=y CONFIG_NET_VENDOR_SMSC=y # CONFIG_SMSC911X is not set CONFIG_NET_VENDOR_SOCIONEXT=y CONFIG_NET_VENDOR_STMICRO=y # CONFIG_STMMAC_ETH is not set CONFIG_NET_VENDOR_SYNOPSYS=y # CONFIG_DWC_XLGMAC is not set CONFIG_NET_VENDOR_VERTEXCOM=y CONFIG_NET_VENDOR_VIA=y # CONFIG_VIA_VELOCITY is not set CONFIG_NET_VENDOR_WIZNET=y # CONFIG_WIZNET_W5100 is not set # CONFIG_WIZNET_W5300 is not set CONFIG_NET_VENDOR_XILINX=y # CONFIG_XILINX_EMACLITE is not set # CONFIG_XILINX_AXI_EMAC is not set # CONFIG_XILINX_LL_TEMAC is not set CONFIG_PHYLINK=y CONFIG_PHYLIB=y CONFIG_SWPHY=y # CONFIG_LED_TRIGGER_PHY is not set CONFIG_FIXED_PHY=y # # MII PHY device drivers # # CONFIG_AMD_PHY is not set # CONFIG_ADIN_PHY is not set # CONFIG_ADIN1100_PHY is not set # CONFIG_AQUANTIA_PHY is not set # CONFIG_AX88796B_PHY is not set # CONFIG_BROADCOM_PHY is not set # CONFIG_BCM54140_PHY is not set # CONFIG_BCM7XXX_PHY is not set # CONFIG_BCM84881_PHY is not set # CONFIG_BCM87XX_PHY is not set # CONFIG_CICADA_PHY is not set # CONFIG_CORTINA_PHY is not set # CONFIG_DAVICOM_PHY is not set # CONFIG_ICPLUS_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_INTEL_XWAY_PHY is not set # CONFIG_LSI_ET1011C_PHY is not set CONFIG_MARVELL_PHY=y # CONFIG_MARVELL_10G_PHY is not set # CONFIG_MARVELL_88X2222_PHY is not set # CONFIG_MAXLINEAR_GPHY is not set # CONFIG_MEDIATEK_GE_PHY is not set # CONFIG_MICREL_PHY is not set # CONFIG_MICROCHIP_PHY is not set # CONFIG_MICROCHIP_T1_PHY is not set # CONFIG_MICROSEMI_PHY is not set # CONFIG_MOTORCOMM_PHY is not set # CONFIG_NATIONAL_PHY is not set # CONFIG_NXP_C45_TJA11XX_PHY is not set # CONFIG_NCN26000_PHY is not set # CONFIG_QSEMI_PHY is not set # CONFIG_REALTEK_PHY is not set # CONFIG_RENESAS_PHY is not set # CONFIG_ROCKCHIP_PHY is not set # CONFIG_SMSC_PHY is not set # CONFIG_STE10XP is not set # CONFIG_TERANETICS_PHY is not set # CONFIG_DP83822_PHY is not set # CONFIG_DP83TC811_PHY is not set # CONFIG_DP83848_PHY is not set # CONFIG_DP83867_PHY is not set # CONFIG_DP83869_PHY is not set # CONFIG_DP83TD510_PHY is not set # CONFIG_VITESSE_PHY is not set # CONFIG_XILINX_GMII2RGMII is not set # CONFIG_PSE_CONTROLLER is not set CONFIG_MDIO_DEVICE=y CONFIG_MDIO_BUS=y CONFIG_FWNODE_MDIO=y CONFIG_OF_MDIO=y CONFIG_MDIO_DEVRES=y # CONFIG_MDIO_BITBANG is not set # CONFIG_MDIO_BCM_UNIMAC is not set # CONFIG_MDIO_HISI_FEMAC is not set # CONFIG_MDIO_IPQ4019 is not set # # MDIO Multiplexers # # CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set # CONFIG_MDIO_BUS_MUX_MMIOREG is not set # # PCS device drivers # CONFIG_PCS_ALTERA_TSE=y # end of PCS device drivers # CONFIG_PPP is not set # CONFIG_SLIP is not set # # Host-side USB support is needed for USB Network Adapter support # # CONFIG_WLAN is not set # CONFIG_WAN is not set # # Wireless WAN # # CONFIG_WWAN is not set # end of Wireless WAN # CONFIG_NETDEVSIM is not set # CONFIG_NET_FAILOVER is not set # CONFIG_ISDN is not set # # Input device support # CONFIG_INPUT=y CONFIG_INPUT_LEDS=y # CONFIG_INPUT_FF_MEMLESS is not set # CONFIG_INPUT_SPARSEKMAP is not set # CONFIG_INPUT_MATRIXKMAP is not set CONFIG_INPUT_VIVALDIFMAP=y # # Userland interfaces # # CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_OPENCORES is not set # CONFIG_KEYBOARD_SAMSUNG is not set # CONFIG_KEYBOARD_STOWAWAY is not set # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_OMAP4 is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_BCM is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # CONFIG_RMI4_CORE is not set # # Hardware I/O ports # CONFIG_SERIO=y # CONFIG_SERIO_SERPORT is not set CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set # CONFIG_SERIO_ALTERA_PS2 is not set # CONFIG_SERIO_PS2MULT is not set # CONFIG_SERIO_ARC_PS2 is not set # CONFIG_SERIO_APBPS2 is not set # CONFIG_USERIO is not set # CONFIG_GAMEPORT is not set # end of Hardware I/O ports # end of Input device support # # Character devices # CONFIG_TTY=y # CONFIG_VT is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LEGACY_TIOCSTI=y CONFIG_LDISC_AUTOLOAD=y # # Serial drivers # CONFIG_SERIAL_EARLYCON=y # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # # CONFIG_SERIAL_UARTLITE is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_SIFIVE is not set # CONFIG_SERIAL_SCCNXP is not set CONFIG_SERIAL_ALTERA_JTAGUART=y CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE=y # CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS is not set CONFIG_SERIAL_ALTERA_UART=y CONFIG_SERIAL_ALTERA_UART_MAXPORTS=4 CONFIG_SERIAL_ALTERA_UART_BAUDRATE=115200 # CONFIG_SERIAL_ALTERA_UART_CONSOLE is not set # CONFIG_SERIAL_XILINX_PS_UART is not set # CONFIG_SERIAL_ARC is not set # CONFIG_SERIAL_FSL_LPUART is not set # CONFIG_SERIAL_FSL_LINFLEXUART is not set # CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set # CONFIG_SERIAL_SPRD is not set # end of Serial drivers # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_N_GSM is not set # CONFIG_NULL_TTY is not set # CONFIG_SERIAL_DEV_BUS is not set # CONFIG_TTY_PRINTK is not set # CONFIG_VIRTIO_CONSOLE is not set # CONFIG_IPMI_HANDLER is not set # CONFIG_HW_RANDOM is not set CONFIG_DEVMEM=y # CONFIG_TCG_TPM is not set # CONFIG_XILLYBUS is not set # end of Character devices # # I2C support # # CONFIG_I2C is not set # end of I2C support # CONFIG_I3C is not set # CONFIG_SPI is not set # CONFIG_SPMI is not set # CONFIG_HSI is not set CONFIG_PPS=y # CONFIG_PPS_DEBUG is not set # # PPS clients support # # CONFIG_PPS_CLIENT_KTIMER is not set # CONFIG_PPS_CLIENT_LDISC is not set # CONFIG_PPS_CLIENT_GPIO is not set # # PPS generators support # # # PTP clock support # CONFIG_PTP_1588_CLOCK=y CONFIG_PTP_1588_CLOCK_OPTIONAL=y # # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # # end of PTP clock support # CONFIG_PINCTRL is not set # CONFIG_GPIOLIB is not set # CONFIG_W1 is not set # CONFIG_POWER_RESET is not set # CONFIG_POWER_SUPPLY is not set # CONFIG_HWMON is not set # CONFIG_THERMAL is not set # CONFIG_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y # CONFIG_SSB is not set CONFIG_BCMA_POSSIBLE=y # CONFIG_BCMA is not set # # Multifunction device drivers # # CONFIG_MFD_ATMEL_FLEXCOM is not set # CONFIG_MFD_ATMEL_HLCDC is not set # CONFIG_MFD_MADERA is not set # CONFIG_MFD_HI6421_PMIC is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_MFD_KEMPLD is not set # CONFIG_MFD_MT6397 is not set # CONFIG_MFD_SM501 is not set # CONFIG_MFD_SYSCON is not set # CONFIG_MFD_TI_AM335X_TSCADC is not set # CONFIG_MFD_TQMX86 is not set # end of Multifunction device drivers # CONFIG_REGULATOR is not set # CONFIG_RC_CORE is not set # # CEC support # # CONFIG_MEDIA_CEC_SUPPORT is not set # end of CEC support # CONFIG_MEDIA_SUPPORT is not set # # Graphics support # # CONFIG_DRM is not set # # ARM devices # # end of ARM devices # # Frame buffer Devices # # CONFIG_FB is not set # end of Frame buffer Devices # # Backlight & LCD device support # # CONFIG_LCD_CLASS_DEVICE is not set # CONFIG_BACKLIGHT_CLASS_DEVICE is not set # end of Backlight & LCD device support # end of Graphics support # CONFIG_SOUND is not set # # HID support # CONFIG_HID=y # CONFIG_HID_BATTERY_STRENGTH is not set # CONFIG_HIDRAW is not set # CONFIG_UHID is not set CONFIG_HID_GENERIC=y # # Special HID drivers # # CONFIG_HID_A4TECH is not set # CONFIG_HID_ACRUX is not set # CONFIG_HID_APPLE is not set # CONFIG_HID_AUREAL is not set # CONFIG_HID_BELKIN is not set # CONFIG_HID_CHERRY is not set # CONFIG_HID_COUGAR is not set # CONFIG_HID_MACALLY is not set # CONFIG_HID_CMEDIA is not set # CONFIG_HID_CYPRESS is not set # CONFIG_HID_DRAGONRISE is not set # CONFIG_HID_EMS_FF is not set # CONFIG_HID_ELECOM is not set # CONFIG_HID_EZKEY is not set # CONFIG_HID_GEMBIRD is not set # CONFIG_HID_GFRM is not set # CONFIG_HID_GLORIOUS is not set # CONFIG_HID_VIVALDI is not set # CONFIG_HID_KEYTOUCH is not set # CONFIG_HID_KYE is not set # CONFIG_HID_WALTOP is not set # CONFIG_HID_VIEWSONIC is not set # CONFIG_HID_VRC2 is not set # CONFIG_HID_XIAOMI is not set # CONFIG_HID_GYRATION is not set # CONFIG_HID_ICADE is not set # CONFIG_HID_ITE is not set # CONFIG_HID_JABRA is not set # CONFIG_HID_TWINHAN is not set # CONFIG_HID_KENSINGTON is not set # CONFIG_HID_LCPOWER is not set # CONFIG_HID_LED is not set # CONFIG_HID_LENOVO is not set # CONFIG_HID_MAGICMOUSE is not set # CONFIG_HID_MALTRON is not set # CONFIG_HID_MAYFLASH is not set # CONFIG_HID_REDRAGON is not set # CONFIG_HID_MICROSOFT is not set # CONFIG_HID_MONTEREY is not set # CONFIG_HID_MULTITOUCH is not set # CONFIG_HID_NINTENDO is not set # CONFIG_HID_NTI is not set # CONFIG_HID_ORTEK is not set # CONFIG_HID_PANTHERLORD is not set # CONFIG_HID_PETALYNX is not set # CONFIG_HID_PICOLCD is not set # CONFIG_HID_PLANTRONICS is not set # CONFIG_HID_PXRC is not set # CONFIG_HID_RAZER is not set # CONFIG_HID_PRIMAX is not set # CONFIG_HID_SAITEK is not set # CONFIG_HID_SEMITEK is not set # CONFIG_HID_SPEEDLINK is not set # CONFIG_HID_STEAM is not set # CONFIG_HID_STEELSERIES is not set # CONFIG_HID_SUNPLUS is not set # CONFIG_HID_RMI is not set # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set # CONFIG_HID_TIVO is not set # CONFIG_HID_TOPSEED is not set # CONFIG_HID_TOPRE is not set # CONFIG_HID_THINGM is not set # CONFIG_HID_UDRAW_PS3 is not set # CONFIG_HID_WIIMOTE is not set # CONFIG_HID_XINMO is not set # CONFIG_HID_ZEROPLUS is not set # CONFIG_HID_ZYDACRON is not set # CONFIG_HID_SENSOR_HUB is not set # CONFIG_HID_ALPS is not set # end of Special HID drivers # end of HID support CONFIG_USB_OHCI_LITTLE_ENDIAN=y # CONFIG_USB_SUPPORT is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y # CONFIG_LEDS_CLASS_FLASH is not set # CONFIG_LEDS_CLASS_MULTICOLOR is not set # CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set # # LED drivers # # CONFIG_LEDS_BCM6328 is not set # CONFIG_LEDS_BCM6358 is not set # # LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) # # CONFIG_LEDS_MLXREG is not set # CONFIG_LEDS_USER is not set # # Flash and Torch LED drivers # # # RGB LED drivers # # # LED Triggers # CONFIG_LEDS_TRIGGERS=y # CONFIG_LEDS_TRIGGER_TIMER is not set # CONFIG_LEDS_TRIGGER_ONESHOT is not set # CONFIG_LEDS_TRIGGER_MTD is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=y # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set # CONFIG_LEDS_TRIGGER_CPU is not set # CONFIG_LEDS_TRIGGER_ACTIVITY is not set # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set # # iptables trigger is under Netfilter config (LED target) # # CONFIG_LEDS_TRIGGER_TRANSIENT is not set # CONFIG_LEDS_TRIGGER_CAMERA is not set # CONFIG_LEDS_TRIGGER_PANIC is not set # CONFIG_LEDS_TRIGGER_NETDEV is not set # CONFIG_LEDS_TRIGGER_PATTERN is not set # CONFIG_LEDS_TRIGGER_AUDIO is not set # CONFIG_LEDS_TRIGGER_TTY is not set # # Simple LED drivers # # CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set # CONFIG_RTC_CLASS is not set # CONFIG_DMADEVICES is not set # # DMABUF options # # CONFIG_SYNC_FILE is not set # CONFIG_DMABUF_HEAPS is not set # end of DMABUF options # CONFIG_AUXDISPLAY is not set # CONFIG_UIO is not set # CONFIG_VFIO is not set # CONFIG_VIRT_DRIVERS is not set CONFIG_VIRTIO_MENU=y # CONFIG_VIRTIO_MMIO is not set # CONFIG_VDPA is not set CONFIG_VHOST_MENU=y # CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set # # Microsoft Hyper-V guest support # # end of Microsoft Hyper-V guest support # CONFIG_GREYBUS is not set # CONFIG_COMEDI is not set # CONFIG_STAGING is not set # CONFIG_GOLDFISH is not set CONFIG_HAVE_CLK=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y # CONFIG_COMMON_CLK_AXI_CLKGEN is not set # CONFIG_COMMON_CLK_FIXED_MMIO is not set # CONFIG_XILINX_VCU is not set # CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set # CONFIG_HWSPINLOCK is not set # # Clock Source drivers # CONFIG_TIMER_OF=y CONFIG_TIMER_PROBE=y # CONFIG_MICROCHIP_PIT64B is not set # end of Clock Source drivers # CONFIG_MAILBOX is not set CONFIG_IOMMU_SUPPORT=y # # Generic IOMMU Pagetable Support # # end of Generic IOMMU Pagetable Support # CONFIG_IOMMU_DEBUGFS is not set # CONFIG_IOMMUFD is not set # # Remoteproc drivers # # CONFIG_REMOTEPROC is not set # end of Remoteproc drivers # # Rpmsg drivers # # CONFIG_RPMSG_VIRTIO is not set # end of Rpmsg drivers # CONFIG_SOUNDWIRE is not set # # SOC (System On Chip) specific Drivers # # # Amlogic SoC drivers # # end of Amlogic SoC drivers # # Broadcom SoC drivers # # end of Broadcom SoC drivers # # NXP/Freescale QorIQ SoC drivers # # end of NXP/Freescale QorIQ SoC drivers # # fujitsu SoC drivers # # end of fujitsu SoC drivers # # i.MX SoC drivers # # end of i.MX SoC drivers # # Enable LiteX SoC Builder specific drivers # # CONFIG_LITEX_SOC_CONTROLLER is not set # end of Enable LiteX SoC Builder specific drivers # # Qualcomm SoC drivers # # end of Qualcomm SoC drivers # CONFIG_SOC_TI is not set # # Xilinx SoC drivers # # end of Xilinx SoC drivers # end of SOC (System On Chip) specific Drivers # CONFIG_PM_DEVFREQ is not set # CONFIG_EXTCON is not set # CONFIG_MEMORY is not set # CONFIG_IIO is not set # CONFIG_PWM is not set # # IRQ chip support # CONFIG_IRQCHIP=y # CONFIG_AL_FIC is not set # CONFIG_XILINX_INTC is not set # end of IRQ chip support # CONFIG_IPACK_BUS is not set # CONFIG_RESET_CONTROLLER is not set # # PHY Subsystem # # CONFIG_GENERIC_PHY is not set # CONFIG_PHY_CAN_TRANSCEIVER is not set # # PHY drivers for Broadcom platforms # # CONFIG_BCM_KONA_USB2_PHY is not set # end of PHY drivers for Broadcom platforms # CONFIG_PHY_CADENCE_TORRENT is not set # CONFIG_PHY_CADENCE_DPHY is not set # CONFIG_PHY_CADENCE_DPHY_RX is not set # CONFIG_PHY_CADENCE_SALVO is not set # CONFIG_PHY_PXA_28NM_HSIC is not set # CONFIG_PHY_PXA_28NM_USB2 is not set # end of PHY Subsystem # CONFIG_POWERCAP is not set # CONFIG_MCB is not set # CONFIG_RAS is not set # # Android # # CONFIG_ANDROID_BINDER_IPC is not set # end of Android # CONFIG_DAX is not set CONFIG_NVMEM=y CONFIG_NVMEM_SYSFS=y # CONFIG_NVMEM_RMEM is not set # CONFIG_NVMEM_U_BOOT_ENV is not set # # HW tracing support # # CONFIG_STM is not set # CONFIG_INTEL_TH is not set # end of HW tracing support # CONFIG_FPGA is not set # CONFIG_FSI is not set # CONFIG_SIOX is not set # CONFIG_SLIMBUS is not set # CONFIG_INTERCONNECT is not set # CONFIG_COUNTER is not set # CONFIG_PECI is not set # CONFIG_HTE is not set # end of Device Drivers # # File systems # # CONFIG_VALIDATE_FS_PARSER is not set # CONFIG_EXT2_FS is not set # CONFIG_EXT3_FS is not set # CONFIG_EXT4_FS is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set # CONFIG_XFS_FS is not set # CONFIG_GFS2_FS is not set # CONFIG_BTRFS_FS is not set # CONFIG_NILFS2_FS is not set # CONFIG_F2FS_FS is not set CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y # CONFIG_EXPORTFS_BLOCK_OPS is not set CONFIG_FILE_LOCKING=y # CONFIG_FS_ENCRYPTION is not set # CONFIG_FS_VERITY is not set # CONFIG_DNOTIFY is not set # CONFIG_INOTIFY_USER is not set # CONFIG_FANOTIFY is not set # CONFIG_QUOTA is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_AUTOFS_FS is not set # CONFIG_FUSE_FS is not set # CONFIG_OVERLAY_FS is not set # # Caches # # CONFIG_FSCACHE is not set # end of Caches # # CD-ROM/DVD Filesystems # # CONFIG_ISO9660_FS is not set # CONFIG_UDF_FS is not set # end of CD-ROM/DVD Filesystems # # DOS/FAT/EXFAT/NT Filesystems # # CONFIG_MSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_EXFAT_FS is not set # CONFIG_NTFS_FS is not set # CONFIG_NTFS3_FS is not set # end of DOS/FAT/EXFAT/NT Filesystems # # Pseudo filesystems # CONFIG_PROC_FS=y # CONFIG_PROC_KCORE is not set CONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=y # CONFIG_PROC_CHILDREN is not set CONFIG_KERNFS=y CONFIG_SYSFS=y # CONFIG_CONFIGFS_FS is not set # end of Pseudo filesystems CONFIG_MISC_FILESYSTEMS=y # CONFIG_ORANGEFS_FS is not set # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y # CONFIG_JFFS2_FS_WBUF_VERIFY is not set # CONFIG_JFFS2_SUMMARY is not set # CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_CRAMFS is not set # CONFIG_SQUASHFS is not set # CONFIG_VXFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_OMFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_QNX6FS_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_PSTORE is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set # CONFIG_EROFS_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V2=y CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y # CONFIG_NFS_V4 is not set CONFIG_ROOT_NFS=y CONFIG_NFS_DEBUG=y CONFIG_NFS_DISABLE_UDP_SUPPORT=y CONFIG_GRACE_PERIOD=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_DEBUG=y # CONFIG_CEPH_FS is not set # CONFIG_CIFS is not set # CONFIG_SMB_SERVER is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set # CONFIG_NLS is not set # CONFIG_UNICODE is not set CONFIG_IO_WQ=y # end of File systems # # Security options # # CONFIG_KEYS is not set # CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set # CONFIG_SECURITYFS is not set CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y # CONFIG_HARDENED_USERCOPY is not set # CONFIG_STATIC_USERMODEHELPER is not set CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf" # # Kernel hardening options # # # Memory initialization # CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y # CONFIG_INIT_STACK_NONE is not set # CONFIG_INIT_STACK_ALL_PATTERN is not set CONFIG_INIT_STACK_ALL_ZERO=y # CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set # CONFIG_INIT_ON_FREE_DEFAULT_ON is not set CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y # CONFIG_ZERO_CALL_USED_REGS is not set # end of Memory initialization CONFIG_RANDSTRUCT_NONE=y # end of Kernel hardening options # end of Security options CONFIG_CRYPTO=y # # Crypto core or helper # # CONFIG_CRYPTO_MANAGER is not set # CONFIG_CRYPTO_USER is not set CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y # CONFIG_CRYPTO_NULL is not set # CONFIG_CRYPTO_CRYPTD is not set # CONFIG_CRYPTO_AUTHENC is not set # CONFIG_CRYPTO_TEST is not set # end of Crypto core or helper # # Public-key cryptography # # CONFIG_CRYPTO_RSA is not set # CONFIG_CRYPTO_DH is not set # CONFIG_CRYPTO_ECDH is not set # CONFIG_CRYPTO_ECDSA is not set # CONFIG_CRYPTO_ECRDSA is not set # CONFIG_CRYPTO_SM2 is not set # CONFIG_CRYPTO_CURVE25519 is not set # end of Public-key cryptography # # Block ciphers # # CONFIG_CRYPTO_AES is not set # CONFIG_CRYPTO_AES_TI is not set # CONFIG_CRYPTO_ARIA is not set # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_DES is not set # CONFIG_CRYPTO_FCRYPT is not set # CONFIG_CRYPTO_SERPENT is not set # CONFIG_CRYPTO_SM4_GENERIC is not set # CONFIG_CRYPTO_TWOFISH is not set # end of Block ciphers # # Length-preserving ciphers and modes # # CONFIG_CRYPTO_ADIANTUM is not set # CONFIG_CRYPTO_CHACHA20 is not set # CONFIG_CRYPTO_CBC is not set # CONFIG_CRYPTO_CFB is not set # CONFIG_CRYPTO_CTR is not set # CONFIG_CRYPTO_CTS is not set # CONFIG_CRYPTO_ECB is not set # CONFIG_CRYPTO_HCTR2 is not set # CONFIG_CRYPTO_KEYWRAP is not set # CONFIG_CRYPTO_LRW is not set # CONFIG_CRYPTO_OFB is not set # CONFIG_CRYPTO_PCBC is not set # CONFIG_CRYPTO_XTS is not set # end of Length-preserving ciphers and modes # # AEAD (authenticated encryption with associated data) ciphers # # CONFIG_CRYPTO_AEGIS128 is not set # CONFIG_CRYPTO_CHACHA20POLY1305 is not set # CONFIG_CRYPTO_CCM is not set # CONFIG_CRYPTO_GCM is not set # CONFIG_CRYPTO_SEQIV is not set # CONFIG_CRYPTO_ECHAINIV is not set # CONFIG_CRYPTO_ESSIV is not set # end of AEAD (authenticated encryption with associated data) ciphers # # Hashes, digests, and MACs # # CONFIG_CRYPTO_BLAKE2B is not set # CONFIG_CRYPTO_CMAC is not set # CONFIG_CRYPTO_GHASH is not set # CONFIG_CRYPTO_HMAC is not set # CONFIG_CRYPTO_MD4 is not set # CONFIG_CRYPTO_MD5 is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_POLY1305 is not set # CONFIG_CRYPTO_RMD160 is not set # CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set # CONFIG_CRYPTO_SHA3 is not set # CONFIG_CRYPTO_SM3_GENERIC is not set # CONFIG_CRYPTO_STREEBOG is not set # CONFIG_CRYPTO_VMAC is not set # CONFIG_CRYPTO_WP512 is not set # CONFIG_CRYPTO_XCBC is not set # CONFIG_CRYPTO_XXHASH is not set # end of Hashes, digests, and MACs # # CRCs (cyclic redundancy checks) # # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_CRC32 is not set # CONFIG_CRYPTO_CRCT10DIF is not set # end of CRCs (cyclic redundancy checks) # # Compression # # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_LZO is not set # CONFIG_CRYPTO_842 is not set # CONFIG_CRYPTO_LZ4 is not set # CONFIG_CRYPTO_LZ4HC is not set # CONFIG_CRYPTO_ZSTD is not set # end of Compression # # Random number generation # # CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_DRBG_MENU is not set # CONFIG_CRYPTO_JITTERENTROPY is not set # end of Random number generation # # Userspace interface # # CONFIG_CRYPTO_USER_API_HASH is not set # CONFIG_CRYPTO_USER_API_SKCIPHER is not set # CONFIG_CRYPTO_USER_API_RNG is not set # CONFIG_CRYPTO_USER_API_AEAD is not set # end of Userspace interface CONFIG_CRYPTO_HW=y # CONFIG_CRYPTO_DEV_SAFEXCEL is not set # CONFIG_CRYPTO_DEV_CCREE is not set # CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set # # Certificates for signature checking # # end of Certificates for signature checking # # Library routines # # CONFIG_PACKING is not set CONFIG_BITREVERSE=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_NET_UTILS=y # CONFIG_CORDIC is not set # CONFIG_PRIME_NUMBERS is not set CONFIG_RATIONAL=y # # Crypto library routines # CONFIG_CRYPTO_LIB_UTILS=y CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y # CONFIG_CRYPTO_LIB_CHACHA is not set # CONFIG_CRYPTO_LIB_CURVE25519 is not set CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1 # CONFIG_CRYPTO_LIB_POLY1305 is not set # CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not set CONFIG_CRYPTO_LIB_SHA1=y CONFIG_CRYPTO_LIB_SHA256=y # end of Crypto library routines # CONFIG_CRC_CCITT is not set # CONFIG_CRC16 is not set # CONFIG_CRC_T10DIF is not set # CONFIG_CRC64_ROCKSOFT is not set # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y # CONFIG_CRC32_SELFTEST is not set CONFIG_CRC32_SLICEBY8=y # CONFIG_CRC32_SLICEBY4 is not set # CONFIG_CRC32_SARWATE is not set # CONFIG_CRC32_BIT is not set # CONFIG_CRC64 is not set # CONFIG_CRC4 is not set # CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set # CONFIG_CRC8 is not set # CONFIG_RANDOM32_SELFTEST is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y # CONFIG_XZ_DEC is not set CONFIG_HAS_IOMEM=y CONFIG_HAS_DMA=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_DMA_DECLARE_COHERENT=y CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y # CONFIG_DMA_API_DEBUG is not set # CONFIG_DMA_MAP_BENCHMARK is not set CONFIG_DQL=y CONFIG_GLOB=y # CONFIG_GLOB_SELFTEST is not set CONFIG_NLATTR=y CONFIG_GENERIC_ATOMIC64=y # CONFIG_IRQ_POLL is not set CONFIG_LIBFDT=y CONFIG_SBITMAP=y # end of Library routines # # Kernel hacking # # # printk and dmesg options # # CONFIG_PRINTK_TIME is not set # CONFIG_PRINTK_CALLER is not set # CONFIG_STACKTRACE_BUILD_ID is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_LOGLEVEL_QUIET=4 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_DYNAMIC_DEBUG is not set # CONFIG_DYNAMIC_DEBUG_CORE is not set CONFIG_SYMBOLIC_ERRNAME=y # end of printk and dmesg options CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_MISC=y # # Compile-time checks and compiler options # CONFIG_DEBUG_INFO=y CONFIG_AS_HAS_NON_CONST_LEB128=y # CONFIG_DEBUG_INFO_NONE is not set CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_DWARF5 is not set # CONFIG_DEBUG_INFO_REDUCED is not set CONFIG_DEBUG_INFO_COMPRESSED_NONE=y # CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set # CONFIG_DEBUG_INFO_SPLIT is not set CONFIG_PAHOLE_HAS_SPLIT_BTF=y # CONFIG_GDB_SCRIPTS is not set CONFIG_FRAME_WARN=1024 # CONFIG_STRIP_ASM_SYMS is not set # CONFIG_READABLE_ASM is not set # CONFIG_HEADERS_INSTALL is not set CONFIG_DEBUG_SECTION_MISMATCH=y CONFIG_SECTION_MISMATCH_WARN_ONLY=y # CONFIG_VMLINUX_MAP is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set # end of Compile-time checks and compiler options # # Generic Kernel Debugging Instruments # # CONFIG_MAGIC_SYSRQ is not set CONFIG_DEBUG_FS=y CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set # CONFIG_DEBUG_FS_ALLOW_NONE is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set # CONFIG_UBSAN is not set CONFIG_HAVE_KCSAN_COMPILER=y # end of Generic Kernel Debugging Instruments # # Networking Debugging # # CONFIG_DEBUG_NET is not set # end of Networking Debugging # # Memory Debugging # # CONFIG_PAGE_EXTENSION is not set # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_PAGE_POISONING is not set # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SHRINKER_DEBUG is not set # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_SCHED_STACK_END_CHECK is not set # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_MEMORY_INIT is not set CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y # end of Memory Debugging # CONFIG_DEBUG_SHIRQ is not set # # Debug Oops, Lockups and Hangs # # CONFIG_PANIC_ON_OOPS is not set CONFIG_PANIC_ON_OOPS_VALUE=0 CONFIG_PANIC_TIMEOUT=0 # CONFIG_SOFTLOCKUP_DETECTOR is not set # CONFIG_DETECT_HUNG_TASK is not set # CONFIG_WQ_WATCHDOG is not set # CONFIG_TEST_LOCKUP is not set # end of Debug Oops, Lockups and Hangs # # Scheduler Debugging # CONFIG_SCHED_DEBUG=y # CONFIG_SCHEDSTATS is not set # end of Scheduler Debugging # CONFIG_DEBUG_TIMEKEEPING is not set # # Lock Debugging (spinlocks, mutexes, etc...) # # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set # CONFIG_DEBUG_RWSEMS is not set # CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set # CONFIG_WW_MUTEX_SELFTEST is not set # CONFIG_SCF_TORTURE_TEST is not set # end of Lock Debugging (spinlocks, mutexes, etc...) # CONFIG_DEBUG_IRQFLAGS is not set # CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set # CONFIG_DEBUG_KOBJECT is not set # # Debug kernel data structures # # CONFIG_DEBUG_LIST is not set # CONFIG_DEBUG_PLIST is not set # CONFIG_DEBUG_SG is not set # CONFIG_DEBUG_NOTIFIERS is not set # CONFIG_BUG_ON_DATA_CORRUPTION is not set # CONFIG_DEBUG_MAPLE_TREE is not set # end of Debug kernel data structures # CONFIG_DEBUG_CREDENTIALS is not set # # RCU Debugging # # CONFIG_RCU_SCALE_TEST is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_RCU_REF_SCALE_TEST is not set # CONFIG_RCU_TRACE is not set # CONFIG_RCU_EQS_DEBUG is not set # end of RCU Debugging # CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set # CONFIG_SAMPLES is not set # # nios2 Debugging # CONFIG_EARLY_PRINTK=y # end of nios2 Debugging # # Kernel Testing and Coverage # # CONFIG_KUNIT is not set # CONFIG_NOTIFIER_ERROR_INJECTION is not set # CONFIG_FAULT_INJECTION is not set CONFIG_CC_HAS_SANCOV_TRACE_PC=y CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_LKDTM is not set # CONFIG_TEST_MIN_HEAP is not set # CONFIG_TEST_DIV64 is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_RBTREE_TEST is not set # CONFIG_REED_SOLOMON_TEST is not set # CONFIG_INTERVAL_TREE_TEST is not set # CONFIG_PERCPU_TEST is not set # CONFIG_ATOMIC64_SELFTEST is not set # CONFIG_TEST_HEXDUMP is not set # CONFIG_STRING_SELFTEST is not set # CONFIG_TEST_STRING_HELPERS is not set # CONFIG_TEST_KSTRTOX is not set # CONFIG_TEST_PRINTF is not set # CONFIG_TEST_SCANF is not set # CONFIG_TEST_BITMAP is not set # CONFIG_TEST_UUID is not set # CONFIG_TEST_XARRAY is not set # CONFIG_TEST_MAPLE_TREE is not set # CONFIG_TEST_RHASHTABLE is not set # CONFIG_TEST_IDA is not set # CONFIG_TEST_LKM is not set # CONFIG_TEST_BITOPS is not set # CONFIG_TEST_VMALLOC is not set # CONFIG_TEST_USER_COPY is not set # CONFIG_TEST_BPF is not set # CONFIG_TEST_BLACKHOLE_DEV is not set # CONFIG_FIND_BIT_BENCHMARK is not set # CONFIG_TEST_SYSCTL is not set # CONFIG_TEST_UDELAY is not set # CONFIG_TEST_STATIC_KEYS is not set # CONFIG_TEST_KMOD is not set # CONFIG_TEST_MEMCAT_P is not set # CONFIG_TEST_MEMINIT is not set # CONFIG_TEST_FREE_PAGES is not set # end of Kernel Testing and Coverage # # Rust hacking # # end of Rust hacking # end of Kernel hacking
On Mon, Jan 16, 2023 at 9:44 AM kernel test robot <lkp@intel.com> wrote: > Hi Pierluigi, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on net-next/master] > [also build test ERROR on net/master linus/master v6.2-rc4 next-20230116] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Pierluigi-Passaro/net-mdio-force-deassert-MDIO-reset-signal/20230116-001044 > patch link: https://lore.kernel.org/r/20230115161006.16431-1-pierluigi.p%40variscite.com > patch subject: [PATCH] net: mdio: force deassert MDIO reset signal > config: nios2-defconfig > compiler: nios2-linux-gcc (GCC) 12.1.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/3f08f04af6947d4fce17b11443001c4e386ca66e > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Pierluigi-Passaro/net-mdio-force-deassert-MDIO-reset-signal/20230116-001044 > git checkout 3f08f04af6947d4fce17b11443001c4e386ca66e > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 olddefconfig > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@intel.com> > patch available here https://lore.kernel.org/all/20230116140811.27201-1-pierluigi.p@variscite.com/ > > All errors (new ones prefixed by >>): > > nios2-linux-ld: drivers/net/mdio/fwnode_mdio.o: in function `fwnode_mdiobus_register_phy': > >> drivers/net/mdio/fwnode_mdio.c:164: undefined reference to `gpiochip_free_own_desc' > drivers/net/mdio/fwnode_mdio.c:164:(.text+0x230): relocation truncated to fit: R_NIOS2_CALL26 against `gpiochip_free_own_desc' > > > vim +164 drivers/net/mdio/fwnode_mdio.c > > 113 > 114 int fwnode_mdiobus_register_phy(struct mii_bus *bus, > 115 struct fwnode_handle *child, u32 addr) > 116 { > 117 struct mii_timestamper *mii_ts = NULL; > 118 struct pse_control *psec = NULL; > 119 struct phy_device *phy; > 120 bool is_c45 = false; > 121 u32 phy_id; > 122 int rc; > 123 int reset_deassert_delay = 0; > 124 struct gpio_desc *reset_gpio; > 125 > 126 psec = fwnode_find_pse_control(child); > 127 if (IS_ERR(psec)) > 128 return PTR_ERR(psec); > 129 > 130 mii_ts = fwnode_find_mii_timestamper(child); > 131 if (IS_ERR(mii_ts)) { > 132 rc = PTR_ERR(mii_ts); > 133 goto clean_pse; > 134 } > 135 > 136 rc = fwnode_property_match_string(child, "compatible", > 137 "ethernet-phy-ieee802.3-c45"); > 138 if (rc >= 0) > 139 is_c45 = true; > 140 > 141 reset_gpio = fwnode_gpiod_get_index(child, "reset", 0, GPIOD_OUT_LOW, "PHY reset"); > 142 if (reset_gpio == ERR_PTR(-EPROBE_DEFER)) { > 143 dev_dbg(&bus->dev, "reset signal for PHY@%u not ready\n", addr); > 144 return -EPROBE_DEFER; > 145 } else if (IS_ERR(reset_gpio)) { > 146 if (reset_gpio == ERR_PTR(-ENOENT)) > 147 dev_dbg(&bus->dev, "reset signal for PHY@%u not defined\n", addr); > 148 else > 149 dev_dbg(&bus->dev, "failed to request reset for PHY@%u, error %ld\n", addr, PTR_ERR(reset_gpio)); > 150 reset_gpio = NULL; > 151 } else { > 152 dev_dbg(&bus->dev, "deassert reset signal for PHY@%u\n", addr); > 153 fwnode_property_read_u32(child, "reset-deassert-us", > 154 &reset_deassert_delay); > 155 if (reset_deassert_delay) > 156 fsleep(reset_deassert_delay); > 157 } > 158 > 159 if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > 160 phy = get_phy_device(bus, addr, is_c45); > 161 else > 162 phy = phy_device_create(bus, addr, phy_id, 0, NULL); > 163 > > 164 gpiochip_free_own_desc(reset_gpio); > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests
On Mon, Jan 16, 2023 at 9:44 AM kernel test robot <lkp@intel.com> wrote: > Hi Pierluigi, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on net-next/master] > [also build test ERROR on net/master linus/master v6.2-rc4 next-20230116] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Pierluigi-Passaro/net-mdio-force-deassert-MDIO-reset-signal/20230116-001044 > patch link: https://lore.kernel.org/r/20230115161006.16431-1-pierluigi.p%40variscite.com > patch subject: [PATCH] net: mdio: force deassert MDIO reset signal > config: nios2-defconfig > compiler: nios2-linux-gcc (GCC) 12.1.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/3f08f04af6947d4fce17b11443001c4e386ca66e > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Pierluigi-Passaro/net-mdio-force-deassert-MDIO-reset-signal/20230116-001044 > git checkout 3f08f04af6947d4fce17b11443001c4e386ca66e > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 olddefconfig > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@intel.com> > The config file used to build this kernel disables CONFIG_GPIOLIB. Is this intentional ? If yes, I suppose the patch should fix the code here https://github.com/intel-lab-lkp/linux/blob/3f08f04af6947d4fce17b11443001c4e386ca66e/include/linux/gpio/driver.h#L761-L798 with something like #ifdef CONFIG_GPIOLIB ... struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *gc, unsigned int hwnum, const char *label, enum gpio_lookup_flags lflags, enum gpiod_flags dflags); void gpiochip_free_own_desc(struct gpio_desc *desc); #else ... static inline struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *gc, unsigned int hwnum, const char *label, enum gpio_lookup_flags lflags, enum gpiod_flags dflags) { /* GPIO can never have been requested */ WARN_ON(1); return ERR_PTR(-ENODEV); } static inline void gpiochip_free_own_desc(struct gpio_desc *desc) { WARN_ON(1); } #endif /* CONFIG_GPIOLIB */ Do you agree ? > > All errors (new ones prefixed by >>): > > nios2-linux-ld: drivers/net/mdio/fwnode_mdio.o: in function `fwnode_mdiobus_register_phy': > >> drivers/net/mdio/fwnode_mdio.c:164: undefined reference to `gpiochip_free_own_desc' > drivers/net/mdio/fwnode_mdio.c:164:(.text+0x230): relocation truncated to fit: R_NIOS2_CALL26 against `gpiochip_free_own_desc' > > > vim +164 drivers/net/mdio/fwnode_mdio.c > > 113 > 114 int fwnode_mdiobus_register_phy(struct mii_bus *bus, > 115 struct fwnode_handle *child, u32 addr) > 116 { > 117 struct mii_timestamper *mii_ts = NULL; > 118 struct pse_control *psec = NULL; > 119 struct phy_device *phy; > 120 bool is_c45 = false; > 121 u32 phy_id; > 122 int rc; > 123 int reset_deassert_delay = 0; > 124 struct gpio_desc *reset_gpio; > 125 > 126 psec = fwnode_find_pse_control(child); > 127 if (IS_ERR(psec)) > 128 return PTR_ERR(psec); > 129 > 130 mii_ts = fwnode_find_mii_timestamper(child); > 131 if (IS_ERR(mii_ts)) { > 132 rc = PTR_ERR(mii_ts); > 133 goto clean_pse; > 134 } > 135 > 136 rc = fwnode_property_match_string(child, "compatible", > 137 "ethernet-phy-ieee802.3-c45"); > 138 if (rc >= 0) > 139 is_c45 = true; > 140 > 141 reset_gpio = fwnode_gpiod_get_index(child, "reset", 0, GPIOD_OUT_LOW, "PHY reset"); > 142 if (reset_gpio == ERR_PTR(-EPROBE_DEFER)) { > 143 dev_dbg(&bus->dev, "reset signal for PHY@%u not ready\n", addr); > 144 return -EPROBE_DEFER; > 145 } else if (IS_ERR(reset_gpio)) { > 146 if (reset_gpio == ERR_PTR(-ENOENT)) > 147 dev_dbg(&bus->dev, "reset signal for PHY@%u not defined\n", addr); > 148 else > 149 dev_dbg(&bus->dev, "failed to request reset for PHY@%u, error %ld\n", addr, PTR_ERR(reset_gpio)); > 150 reset_gpio = NULL; > 151 } else { > 152 dev_dbg(&bus->dev, "deassert reset signal for PHY@%u\n", addr); > 153 fwnode_property_read_u32(child, "reset-deassert-us", > 154 &reset_deassert_delay); > 155 if (reset_deassert_delay) > 156 fsleep(reset_deassert_delay); > 157 } > 158 > 159 if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > 160 phy = get_phy_device(bus, addr, is_c45); > 161 else > 162 phy = phy_device_create(bus, addr, phy_id, 0, NULL); > 163 > > 164 gpiochip_free_own_desc(reset_gpio); > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests
On Mon, Jan 16, 2023 at 10:32:38AM +0000, Pierluigi Passaro wrote: > The config file used to build this kernel disables CONFIG_GPIOLIB. > Is this intentional ? All configurations should build - and the build bot tries random configurations. Your job is to fix the errors / warnings that it finds as a result of your patch and submit fixes where appropriate. Don't expect the build bot to provide any guidance or answer questions. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
On Sun, Jan 15, 2023 at 05:10:06PM +0100, Pierluigi Passaro wrote: > When the reset gpio is defined within the node of the device tree > describing the PHY, the reset is initialized and managed only after > calling the fwnode_mdiobus_phy_device_register function. > However, before calling it, the MDIO communication is checked by the > get_phy_device function. > When this happen and the reset GPIO was somehow previously set down, > the get_phy_device function fails, preventing the PHY detection. > These changes force the deassert of the MDIO reset signal before > checking the MDIO channel. > The PHY may require a minimum deassert time before being responsive: > use a reasonable sleep time after forcing the deassert of the MDIO > reset signal. > Once done, free the gpio descriptor to allow managing it later. This has been discussed before. The problem is, it is not just a reset GPIO. There could also be a clock which needs turning on, a regulator, and/or a linux reset controller. And what order do you turn these on? The conclusions of the discussion is you assume the device cannot be found by enumeration, and you put the ID in the compatible. That is enough to get the driver to load, and the driver can then turn everything on in the correct order, with the correct delays, etc. I think there has been some work on generic power sequencing. I've not being following it, so i've no idea how far it has got. If that could be used to solve this problem for all the possible controls of a PHY, i would be open for such patches. Andrew
On 1/15/23 09:08, Andrew Lunn wrote: > On Sun, Jan 15, 2023 at 05:10:06PM +0100, Pierluigi Passaro wrote: >> When the reset gpio is defined within the node of the device tree >> describing the PHY, the reset is initialized and managed only after >> calling the fwnode_mdiobus_phy_device_register function. >> However, before calling it, the MDIO communication is checked by the >> get_phy_device function. >> When this happen and the reset GPIO was somehow previously set down, >> the get_phy_device function fails, preventing the PHY detection. >> These changes force the deassert of the MDIO reset signal before >> checking the MDIO channel. >> The PHY may require a minimum deassert time before being responsive: >> use a reasonable sleep time after forcing the deassert of the MDIO >> reset signal. >> Once done, free the gpio descriptor to allow managing it later. > This has been discussed before. The problem is, it is not just a reset > GPIO. There could also be a clock which needs turning on, a regulator, > and/or a linux reset controller. And what order do you turn these on? > > The conclusions of the discussion is you assume the device cannot be > found by enumeration, and you put the ID in the compatible. That is > enough to get the driver to load, and the driver can then turn > everything on in the correct order, with the correct delays, etc. I've been running into this same problem again and again over the past years. Specifying the ID as part of the compatible string works for clause 22 PHYs, but for clause 45 PHYs it does not work. The code always wants to read the ID from the PHY itself. But I do not understand things well enough to tell whether that's a fundamental restriction of C45 or just our implementation and the implementation can be changed to fix it. Do you have some thoughts on this?
> Specifying the ID as part of the compatible string works for clause 22 PHYs, > but for clause 45 PHYs it does not work. The code always wants to read the > ID from the PHY itself. But I do not understand things well enough to tell > whether that's a fundamental restriction of C45 or just our implementation > and the implementation can be changed to fix it. > > Do you have some thoughts on this? Do you have more details about what goes wrong? Which PHY driver is it? What compatibles do you put into DT for the PHY? To some extent, the ID is only used to find the driver. A C45 device has a lot of ID register, and all of them are used by phy_bus_match() to see if a driver matches. So you need to be careful which ID you pick, it needs to match the driver. It is the driver which decides to use C22 or C45 to talk to the PHY. However, we do have: static int phy_probe(struct device *dev) { ... else if (phydev->is_c45) err = genphy_c45_pma_read_abilities(phydev); else err = genphy_read_abilities(phydev); so it could be a C45 PHY probed using an ID does not have phydev->is_c45 set, and so it looks in the wrong place for the capabilities. Make sure you also have the compatible "ethernet-phy-ieee802.3-c45" which i think should cause is_c45 to be set. There is no fundamental restriction that i know of here, it probably just needs somebody to debug it and find where it goes wrong. Ah! int fwnode_mdiobus_register_phy(struct mii_bus *bus, struct fwnode_handle *child, u32 addr) { ... rc = fwnode_property_match_string(child, "compatible", "ethernet-phy-ieee802.3-c45"); if (rc >= 0) is_c45 = true; if (is_c45 || fwnode_get_phy_id(child, &phy_id)) phy = get_phy_device(bus, addr, is_c45); else phy = phy_device_create(bus, addr, phy_id, 0, NULL); So compatible "ethernet-phy-ieee802.3-c45" results in is_c45 being set true. The if (is_c45 || is then true, so it does not need to call fwnode_get_phy_id(child, &phy_id) so ignores whatever ID is in DT and asks the PHY. Try this, totally untested: diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c index b782c35c4ac1..13be23f8ac97 100644 --- a/drivers/net/mdio/fwnode_mdio.c +++ b/drivers/net/mdio/fwnode_mdio.c @@ -134,10 +134,10 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, if (rc >= 0) is_c45 = true; - if (is_c45 || fwnode_get_phy_id(child, &phy_id)) + if (fwnode_get_phy_id (child, &phy_id)) phy = get_phy_device(bus, addr, is_c45); else - phy = phy_device_create(bus, addr, phy_id, 0, NULL); + phy = phy_device_create(bus, addr, phy_id, is_c45, NULL); if (IS_ERR(phy)) { rc = PTR_ERR(phy); goto clean_mii_ts; Andrew
On Mon, Jan 16, 2023 at 12:55 AM Andrew Lunn <andrew@lunn.ch> wrote: > > Specifying the ID as part of the compatible string works for clause 22 PHYs, > > but for clause 45 PHYs it does not work. The code always wants to read the > > ID from the PHY itself. But I do not understand things well enough to tell > > whether that's a fundamental restriction of C45 or just our implementation > > and the implementation can be changed to fix it. > > > > Do you have some thoughts on this? > > Do you have more details about what goes wrong? Which PHY driver is > it? What compatibles do you put into DT for the PHY? > We use both AR8033 and ADIN1300: these are 10/100/1000 PHYs. They are both probed after the MDIO bus, but skipped if the reset was asserted while probing the MDIO bus. However, for iMX6UL and iMX7 we use C22, not C45. > > To some extent, the ID is only used to find the driver. A C45 device > has a lot of ID registers, and all of them are used by phy_bus_match() > to see if a driver matches. So you need to be careful which ID you > pick, it needs to match the driver. > > It is the driver which decides to use C22 or C45 to talk to the PHY. > However, we do have: > > static int phy_probe(struct device *dev) > { > ... > else if (phydev->is_c45) > err = genphy_c45_pma_read_abilities(phydev); > else > err = genphy_read_abilities(phydev); > > so it could be a C45 PHY probed using an ID does not have > phydev->is_c45 set, and so it looks in the wrong place for the > capabilities. Make sure you also have the compatible > "ethernet-phy-ieee802.3-c45" which i think should cause is_c45 to be > set. > > There is no fundamental restriction that i know of here, it probably > just needs somebody to debug it and find where it goes wrong. > > Ah! > > int fwnode_mdiobus_register_phy(struct mii_bus *bus, > struct fwnode_handle *child, u32 addr) > { > ... > rc = fwnode_property_match_string(child, "compatible", > "ethernet-phy-ieee802.3-c45"); > if (rc >= 0) > is_c45 = true; > > if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > phy = get_phy_device(bus, addr, is_c45); > else > phy = phy_device_create(bus, addr, phy_id, 0, NULL); > > > So compatible "ethernet-phy-ieee802.3-c45" results in is_c45 being set > true. The if (is_c45 || is then true, so it does not need to call > fwnode_get_phy_id(child, &phy_id) so ignores whatever ID is in DT and > asks the PHY. > > Try this, totally untested: > > diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c > index b782c35c4ac1..13be23f8ac97 100644 > --- a/drivers/net/mdio/fwnode_mdio.c > +++ b/drivers/net/mdio/fwnode_mdio.c > @@ -134,10 +134,10 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, > if (rc >= 0) > is_c45 = true; > > - if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > + if (fwnode_get_phy_id (child, &phy_id)) > phy = get_phy_device(bus, addr, is_c45); > else > - phy = phy_device_create(bus, addr, phy_id, 0, NULL); > + phy = phy_device_create(bus, addr, phy_id, is_c45, NULL); > if (IS_ERR(phy)) { > rc = PTR_ERR(phy); > goto clean_mii_ts; > > > Andrew Unfortunately the above doesn't change the condition: this problem is not C45 specific. The call fwnode_get_phy_id just parses the device tree and always passes. This is a sample device tree https://github.com/varigit/linux-imx/blob/5.15-2.0.x-imx_var01/arch/arm64/boot/dts/freescale/imx8qm-var-spear.dtsi#L168-L219
On Mon, Jan 16, 2023 at 08:39:31AM +0000, Pierluigi Passaro wrote: > On Mon, Jan 16, 2023 at 12:55 AM Andrew Lunn <andrew@lunn.ch> wrote: > > > Specifying the ID as part of the compatible string works for clause 22 PHYs, > > > but for clause 45 PHYs it does not work. The code always wants to read the > > > ID from the PHY itself. But I do not understand things well enough to tell > > > whether that's a fundamental restriction of C45 or just our implementation > > > and the implementation can be changed to fix it. > > > > > > Do you have some thoughts on this? > > > > Do you have more details about what goes wrong? Which PHY driver is > > it? What compatibles do you put into DT for the PHY? > > > We use both AR8033 and ADIN1300: these are 10/100/1000 PHYs. > They are both probed after the MDIO bus, but skipped if the reset was > asserted while probing the MDIO bus. > However, for iMX6UL and iMX7 we use C22, not C45. I never said it did. Please read the actual emails, then you would of noticed we have go off on tangent and are trying to fix another issue. Andrew
On 1/15/23 15:55, Andrew Lunn wrote: >> Specifying the ID as part of the compatible string works for clause 22 PHYs, >> but for clause 45 PHYs it does not work. The code always wants to read the >> ID from the PHY itself. But I do not understand things well enough to tell >> whether that's a fundamental restriction of C45 or just our implementation >> and the implementation can be changed to fix it. >> >> Do you have some thoughts on this? > Do you have more details about what goes wrong? Which PHY driver is > it? What compatibles do you put into DT for the PHY? > > To some extent, the ID is only used to find the driver. A C45 device > has a lot of ID register, and all of them are used by phy_bus_match() > to see if a driver matches. So you need to be careful which ID you > pick, it needs to match the driver. > > It is the driver which decides to use C22 or C45 to talk to the PHY. > However, we do have: > > static int phy_probe(struct device *dev) > { > ... > else if (phydev->is_c45) > err = genphy_c45_pma_read_abilities(phydev); > else > err = genphy_read_abilities(phydev); > > so it could be a C45 PHY probed using an ID does not have > phydev->is_c45 set, and so it looks in the wrong place for the > capabilities. Make sure you also have the compatible > "ethernet-phy-ieee802.3-c45" which i think should cause is_c45 to be > set. > > There is no fundamental restriction that i know of here, it probably > just needs somebody to debug it and find where it goes wrong. > > Ah! > > int fwnode_mdiobus_register_phy(struct mii_bus *bus, > struct fwnode_handle *child, u32 addr) > { > ... > rc = fwnode_property_match_string(child, "compatible", > "ethernet-phy-ieee802.3-c45"); > if (rc >= 0) > is_c45 = true; > > if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > phy = get_phy_device(bus, addr, is_c45); > else > phy = phy_device_create(bus, addr, phy_id, 0, NULL); > > > So compatible "ethernet-phy-ieee802.3-c45" results in is_c45 being set > true. The if (is_c45 || is then true, so it does not need to call > fwnode_get_phy_id(child, &phy_id) so ignores whatever ID is in DT and > asks the PHY. > > Try this, totally untested: > > diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c > index b782c35c4ac1..13be23f8ac97 100644 > --- a/drivers/net/mdio/fwnode_mdio.c > +++ b/drivers/net/mdio/fwnode_mdio.c > @@ -134,10 +134,10 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, > if (rc >= 0) > is_c45 = true; > > - if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > + if (fwnode_get_phy_id (child, &phy_id)) > phy = get_phy_device(bus, addr, is_c45); > else > - phy = phy_device_create(bus, addr, phy_id, 0, NULL); > + phy = phy_device_create(bus, addr, phy_id, is_c45, NULL); > if (IS_ERR(phy)) { > rc = PTR_ERR(phy); > goto clean_mii_ts; > I think part of the problem is that for C45 there are a few other fields that get populated by the ID detection, such as devices_in_package and mmds_present. Is this something we can do after running the PHY drivers probe function? Or is it too late at that point?
> > So compatible "ethernet-phy-ieee802.3-c45" results in is_c45 being set > > true. The if (is_c45 || is then true, so it does not need to call > > fwnode_get_phy_id(child, &phy_id) so ignores whatever ID is in DT and > > asks the PHY. > > > > Try this, totally untested: > > > > diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c > > index b782c35c4ac1..13be23f8ac97 100644 > > --- a/drivers/net/mdio/fwnode_mdio.c > > +++ b/drivers/net/mdio/fwnode_mdio.c > > @@ -134,10 +134,10 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, > > if (rc >= 0) > > is_c45 = true; > > - if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > > + if (fwnode_get_phy_id (child, &phy_id)) > > phy = get_phy_device(bus, addr, is_c45); > > else > > - phy = phy_device_create(bus, addr, phy_id, 0, NULL); > > + phy = phy_device_create(bus, addr, phy_id, is_c45, NULL); > > if (IS_ERR(phy)) { > > rc = PTR_ERR(phy); > > goto clean_mii_ts; > > > I think part of the problem is that for C45 there are a few other fields > that get populated by the ID detection, such as devices_in_package and > mmds_present. Is this something we can do after running the PHY drivers > probe function? Or is it too late at that point? As i hinted, it needs somebody to actually debug this and figure out why it does not work. I think what i did above is part of the solution. You need to actually read the ID from the DT, which if you never call fwnode_get_phy_id() you never do. You then need to look at phy_bus_match() and probably remove the return 0; } else { so that C22 style ID matching is performed if matching via c45_ids.device_ids fails. Andrew
On 1/17/23 05:40, Andrew Lunn wrote: >>> So compatible "ethernet-phy-ieee802.3-c45" results in is_c45 being set >>> true. The if (is_c45 || is then true, so it does not need to call >>> fwnode_get_phy_id(child, &phy_id) so ignores whatever ID is in DT and >>> asks the PHY. >>> >>> Try this, totally untested: >>> >>> diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c >>> index b782c35c4ac1..13be23f8ac97 100644 >>> --- a/drivers/net/mdio/fwnode_mdio.c >>> +++ b/drivers/net/mdio/fwnode_mdio.c >>> @@ -134,10 +134,10 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, >>> if (rc >= 0) >>> is_c45 = true; >>> - if (is_c45 || fwnode_get_phy_id(child, &phy_id)) >>> + if (fwnode_get_phy_id (child, &phy_id)) >>> phy = get_phy_device(bus, addr, is_c45); >>> else >>> - phy = phy_device_create(bus, addr, phy_id, 0, NULL); >>> + phy = phy_device_create(bus, addr, phy_id, is_c45, NULL); >>> if (IS_ERR(phy)) { >>> rc = PTR_ERR(phy); >>> goto clean_mii_ts; >>> >> I think part of the problem is that for C45 there are a few other fields >> that get populated by the ID detection, such as devices_in_package and >> mmds_present. Is this something we can do after running the PHY drivers >> probe function? Or is it too late at that point? > As i hinted, it needs somebody to actually debug this and figure out > why it does not work. > > I think what i did above is part of the solution. You need to actually > read the ID from the DT, which if you never call fwnode_get_phy_id() > you never do. > > You then need to look at phy_bus_match() and probably remove the > > return 0; > } else { > > so that C22 style ID matching is performed if matching via > c45_ids.device_ids fails. Sorry, I've should have been more clear. I did try your proposed change a while ago. The problem why it does not work is that there are other fields in the phy data structure that get initialized when reading the IDs for C45. Such as which MMD addresses are valid.
> > > I think part of the problem is that for C45 there are a few other fields > > > that get populated by the ID detection, such as devices_in_package and > > > mmds_present. Is this something we can do after running the PHY drivers > > > probe function? Or is it too late at that point? > > As i hinted, it needs somebody to actually debug this and figure out > > why it does not work. > > > > I think what i did above is part of the solution. You need to actually > > read the ID from the DT, which if you never call fwnode_get_phy_id() > > you never do. > > > > You then need to look at phy_bus_match() and probably remove the > > > > return 0; > > } else { > > > > so that C22 style ID matching is performed if matching via > > c45_ids.device_ids fails. > > Sorry, I've should have been more clear. I did try your proposed change a > while ago. The problem why it does not work is that there are other fields > in the phy data structure that get initialized when reading the IDs for C45. > Such as which MMD addresses are valid. So lets take this one step at a time. Does this change at least get the driver loaded? There is some code in phy-c45.c which needs phydev->c45_ids.mmds_present. So maybe after the driver has probed, and the device should be accessible, we need to call get_phy_c45_ids() to fill in the missing IDs? Andrew
On Mon, Jan 16, 2023 at 3:41 AM Lars-Peter Clausen <lars@metafoo.de> wrote: > On 1/15/23 15:55, Andrew Lunn wrote: > >> Specifying the ID as part of the compatible string works for clause 22 PHYs, > >> but for clause 45 PHYs it does not work. The code always wants to read the > >> ID from the PHY itself. But I do not understand things well enough to tell > >> whether that's a fundamental restriction of C45 or just our implementation > >> and the implementation can be changed to fix it. > >> > >> Do you have some thoughts on this? > > Do you have more details about what goes wrong? Which PHY driver is > > it? What compatibles do you put into DT for the PHY? > > > > To some extent, the ID is only used to find the driver. A C45 device > > has a lot of ID register, and all of them are used by phy_bus_match() > > to see if a driver matches. So you need to be careful which ID you > > pick, it needs to match the driver. > > > > It is the driver which decides to use C22 or C45 to talk to the PHY. > > However, we do have: > > > > static int phy_probe(struct device *dev) > > { > > ... > > else if (phydev->is_c45) > > err = genphy_c45_pma_read_abilities(phydev); > > else > > err = genphy_read_abilities(phydev); > > > > so it could be a C45 PHY probed using an ID does not have > > phydev->is_c45 set, and so it looks in the wrong place for the > > capabilities. Make sure you also have the compatible > > "ethernet-phy-ieee802.3-c45" which i think should cause is_c45 to be > > set. > > > > There is no fundamental restriction that i know of here, it probably > > just needs somebody to debug it and find where it goes wrong. > > > > Ah! > > > > int fwnode_mdiobus_register_phy(struct mii_bus *bus, > > struct fwnode_handle *child, u32 addr) > > { > > ... > > rc = fwnode_property_match_string(child, "compatible", > > "ethernet-phy-ieee802.3-c45"); > > if (rc >= 0) > > is_c45 = true; > > > > if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > > phy = get_phy_device(bus, addr, is_c45); > > else > > phy = phy_device_create(bus, addr, phy_id, 0, NULL); > > > > > > So compatible "ethernet-phy-ieee802.3-c45" results in is_c45 being set > > true. The if (is_c45 || is then true, so it does not need to call > > fwnode_get_phy_id(child, &phy_id) so ignores whatever ID is in DT and > > asks the PHY. > > > > Try this, totally untested: > > > > diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c > > index b782c35c4ac1..13be23f8ac97 100644 > > --- a/drivers/net/mdio/fwnode_mdio.c > > +++ b/drivers/net/mdio/fwnode_mdio.c > > @@ -134,10 +134,10 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, > > if (rc >= 0) > > is_c45 = true; > > > > - if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > > + if (fwnode_get_phy_id (child, &phy_id)) > > phy = get_phy_device(bus, addr, is_c45); > > else > > - phy = phy_device_create(bus, addr, phy_id, 0, NULL); > > + phy = phy_device_create(bus, addr, phy_id, is_c45, NULL); > > if (IS_ERR(phy)) { > > rc = PTR_ERR(phy); > > goto clean_mii_ts; > > > I think part of the problem is that for C45 there are a few other fields > that get populated by the ID detection, such as devices_in_package and > mmds_present. Is this something we can do after running the PHY drivers > probe function? Or is it too late at that point? > Unfortunately the above doesn't change the condition: this problem is not C45 specific. The call fwnode_get_phy_id just parses the device tree and always passes. This is a sample device tree https://github.com/varigit/linux-imx/blob/5.15-2.0.x-imx_var01/arch/arm64/boot/dts/freescale/imx8qm-var-spear.dtsi#L168-L219
On Sun, Jan 15, 2023 at 10:59 PM Lars-Peter Clausen <lars@metafoo.de> wrote: > On 1/15/23 09:08, Andrew Lunn wrote: > > On Sun, Jan 15, 2023 at 05:10:06PM +0100, Pierluigi Passaro wrote: > >> When the reset gpio is defined within the node of the device tree > >> describing the PHY, the reset is initialized and managed only after > >> calling the fwnode_mdiobus_phy_device_register function. > >> However, before calling it, the MDIO communication is checked by the > >> get_phy_device function. > >> When this happen and the reset GPIO was somehow previously set down, > >> the get_phy_device function fails, preventing the PHY detection. > >> These changes force the deassert of the MDIO reset signal before > >> checking the MDIO channel. > >> The PHY may require a minimum deassert time before being responsive: > >> use a reasonable sleep time after forcing the deassert of the MDIO > >> reset signal. > >> Once done, free the gpio descriptor to allow managing it later. > > This has been discussed before. The problem is, it is not just a reset > > GPIO. There could also be a clock which needs turning on, a regulator, > > and/or a linux reset controller. And what order do you turn these on? > > > > The conclusions of the discussion is you assume the device cannot be > > found by enumeration, and you put the ID in the compatible. That is > > enough to get the driver to load, and the driver can then turn > > everything on in the correct order, with the correct delays, etc. > > I've been running into this same problem again and again over the past > years. > > Specifying the ID as part of the compatible string works for clause 22 > PHYs, but for clause 45 PHYs it does not work. The code always wants to > read the ID from the PHY itself. But I do not understand things well > enough to tell whether that's a fundamental restriction of C45 or just > our implementation and the implementation can be changed to fix it. > > Do you have some thoughts on this? > IMHO, since the framework allows defining the reset GPIO, it does not sound reasonable to manage it only after checking if the PHY can communicate: if the reset is asserted, the PHY cannot communicate at all. This patch just ensures that, if the reset GPIO is defined, it's not asserted while checking the communication.
> IMHO, since the framework allows defining the reset GPIO, it does not sound > reasonable to manage it only after checking if the PHY can communicate: > if the reset is asserted, the PHY cannot communicate at all. > This patch just ensures that, if the reset GPIO is defined, it's not asserted > while checking the communication. The problem is, you are only solving 1/4 of the problem. What about the clock the PHY needs? And the regulator, and the linux reset controller? And what order to do enable these, and how long do you wait between each one? And why are you solving this purely for Ethernet PHYs when the same problem probably affects other sorts of devices which have reset GPIOs, regulators and clocks? It looks like MMC/SDIO devices have a similar problem. https://lwn.net/Articles/867740/ As i said, i've not been following this work. Has it got anywhere? Can ethernet PHYs use it? Andrew
On Mon, Jan 16, 2023 at 1:11 AM Andrew Lunn <andrew@lunn.ch> wrote: > > IMHO, since the framework allows defining the reset GPIO, it does not sound > > reasonable to manage it only after checking if the PHY can communicate: > > if the reset is asserted, the PHY cannot communicate at all. > > This patch just ensures that, if the reset GPIO is defined, it's not asserted > > while checking the communication. > > The problem is, you are only solving 1/4 of the problem. What about > the clock the PHY needs? And the regulator, and the linux reset > controller? And what order to do enable these, and how long do you > wait between each one? > Interesting point of view: I was thinking about solving one of 4 problems ;) This problem affects all the platforms using the reset GPIO without ensuring that either u-boot or the HW put a pull-up on it. In our test, the problem is reproducible simply setting the reset to 0 from u-boot and then use the GPIO reset as designed in the MDIO framework. Is this approach reasonable or a comprehensive solution is expected to cover all additional HW actors (clocks, regulators, ...) ?> > And why are you solving this purely for Ethernet PHYs when the same > problem probably affects other sorts of devices which have reset > GPIOs, regulators and clocks? It looks like MMC/SDIO devices have a > similar problem. > > https://lwn.net/Articles/867740/ > > As i said, i've not been following this work. Has it got anywhere? Can > ethernet PHYs use it? > > Andrew I'm not that familiar with the article's implications, but it sounds like a partial redesign of the framework is needed. I'm not sure this is the real point. Let's refer to I2C/SPI/USB busses, the sequence is something like - probe and setup the bus - once the bus is up & running, start probing the connected slaves Apparently, in the MDIO framework there's an excessive coupling between the MDIO bus and the PHYs. I can't really understand why the MDIO bus must check the PHY presence. Other busses try the communication only while probing the slaves, never before.
On Mon, Jan 16, 2023 at 09:44:01AM +0000, Pierluigi Passaro wrote: > On Mon, Jan 16, 2023 at 1:11 AM Andrew Lunn <andrew@lunn.ch> wrote: > > > IMHO, since the framework allows defining the reset GPIO, it does not sound > > > reasonable to manage it only after checking if the PHY can communicate: > > > if the reset is asserted, the PHY cannot communicate at all. > > > This patch just ensures that, if the reset GPIO is defined, it's not asserted > > > while checking the communication. > > > > The problem is, you are only solving 1/4 of the problem. What about > > the clock the PHY needs? And the regulator, and the linux reset > > controller? And what order to do enable these, and how long do you > > wait between each one? > > > Interesting point of view: I was thinking about solving one of 4 problems ;) Lots of small incremental 'improvements' sometimes get you into a real mess because you loose track of the big picture. And i do think we are now in a mess. But i also think we have a better understanding of the problem space. We know there can be arbitrate number of resources which need to be enabled before you can enumerate the bus. We need a generic solution to that problem. And Linux is good at solving a problem once and reusing it other places. So the generic solution should be applicable to other bus types. We also have a well understood workaround, put the IDs in DT. So as far as i'm concerned we don't need to add more incremental 'improvements', we can wait for somebody to put in the effort to solve this properly with generic code. So i don't want to merge this change. Sorry. Andrew
On Tue, Jan 17, 2023 at 3:01 PM Andrew Lunn <andrew@lunn.ch> wrote: > On Mon, Jan 16, 2023 at 09:44:01AM +0000, Pierluigi Passaro wrote: > > On Mon, Jan 16, 2023 at 1:11 AM Andrew Lunn <andrew@lunn.ch> wrote: > > > > IMHO, since the framework allows defining the reset GPIO, it does not sound > > > > reasonable to manage it only after checking if the PHY can communicate: > > > > if the reset is asserted, the PHY cannot communicate at all. > > > > This patch just ensures that, if the reset GPIO is defined, it's not asserted > > > > while checking the communication. > > > > > > The problem is, you are only solving 1/4 of the problem. What about > > > the clock the PHY needs? And the regulator, and the linux reset > > > controller? And what order to do enable these, and how long do you > > > wait between each one? > > > > > Interesting point of view: I was thinking about solving one of 4 problems ;) > > Lots of small incremental 'improvements' sometimes get you into a real > mess because you loose track of the big picture. And i do think we are > now in a mess. But i also think we have a better understanding of the > problem space. We know there can be arbitrate number of resources > which need to be enabled before you can enumerate the bus. We need a > generic solution to that problem. And Linux is good at solving a > problem once and reusing it other places. So the generic solution > should be applicable to other bus types. > > We also have a well understood workaround, put the IDs in DT. So as > far as i'm concerned we don't need to add more incremental > 'improvements', we can wait for somebody to put in the effort to solve > this properly with generic code. > > So i don't want to merge this change. Sorry. > > Andrew Hi Andrew, I can understand your position and I apologize for the mess. Thanks Pier
On Mon, Jan 16, 2023 at 09:44:01AM +0000, Pierluigi Passaro wrote: > I can't really understand why the MDIO bus must check the PHY presence. > Other busses try the communication only while probing the slaves, > never before. That is not true. Any bus that relies on hardware identification to bind drivers reads the identifying information prior to probing. For example, PCI, USB, AMBA to name a few. AMBA didn't used to have this problem, but does now - but at least under AMBA there's a bit more standardisation to what needs to be done. With ethernet PHYs, what's needed is highly platform specific. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
On 1/15/23 14:33, Pierluigi Passaro wrote: > On Sun, Jan 15, 2023 at 10:59 PM Lars-Peter Clausen <lars@metafoo.de> wrote: >> On 1/15/23 09:08, Andrew Lunn wrote: >>> On Sun, Jan 15, 2023 at 05:10:06PM +0100, Pierluigi Passaro wrote: >>>> When the reset gpio is defined within the node of the device tree >>>> describing the PHY, the reset is initialized and managed only after >>>> calling the fwnode_mdiobus_phy_device_register function. >>>> However, before calling it, the MDIO communication is checked by the >>>> get_phy_device function. >>>> When this happen and the reset GPIO was somehow previously set down, >>>> the get_phy_device function fails, preventing the PHY detection. >>>> These changes force the deassert of the MDIO reset signal before >>>> checking the MDIO channel. >>>> The PHY may require a minimum deassert time before being responsive: >>>> use a reasonable sleep time after forcing the deassert of the MDIO >>>> reset signal. >>>> Once done, free the gpio descriptor to allow managing it later. >>> This has been discussed before. The problem is, it is not just a reset >>> GPIO. There could also be a clock which needs turning on, a regulator, >>> and/or a linux reset controller. And what order do you turn these on? >>> >>> The conclusions of the discussion is you assume the device cannot be >>> found by enumeration, and you put the ID in the compatible. That is >>> enough to get the driver to load, and the driver can then turn >>> everything on in the correct order, with the correct delays, etc. >> I've been running into this same problem again and again over the past >> years. >> >> Specifying the ID as part of the compatible string works for clause 22 >> PHYs, but for clause 45 PHYs it does not work. The code always wants to >> read the ID from the PHY itself. But I do not understand things well >> enough to tell whether that's a fundamental restriction of C45 or just >> our implementation and the implementation can be changed to fix it. >> >> Do you have some thoughts on this? >> > IMHO, since the framework allows defining the reset GPIO, it does not sound > reasonable to manage it only after checking if the PHY can communicate: > if the reset is asserted, the PHY cannot communicate at all. > This patch just ensures that, if the reset GPIO is defined, it's not asserted > while checking the communication. I fully agree with you and I think this is the right approach, cause it is required to make systems work. But I've seen two attempts in the past that did the very same thing and they always got rejected. I can't find the patches anymore, but I think one was maybe 2 years ago.
On Sun, Jan 15, 2023 at 11:56 PM Lars-Peter Clausen <lars@metafoo.de> wrote: > On 1/15/23 14:33, Pierluigi Passaro wrote: > > On Sun, Jan 15, 2023 at 10:59 PM Lars-Peter Clausen <lars@metafoo.de> wrote: > >> On 1/15/23 09:08, Andrew Lunn wrote: > >>> On Sun, Jan 15, 2023 at 05:10:06PM +0100, Pierluigi Passaro wrote: > >>>> When the reset gpio is defined within the node of the device tree > >>>> describing the PHY, the reset is initialized and managed only after > >>>> calling the fwnode_mdiobus_phy_device_register function. > >>>> However, before calling it, the MDIO communication is checked by the > >>>> get_phy_device function. > >>>> When this happen and the reset GPIO was somehow previously set down, > >>>> the get_phy_device function fails, preventing the PHY detection. > >>>> These changes force the deassert of the MDIO reset signal before > >>>> checking the MDIO channel. > >>>> The PHY may require a minimum deassert time before being responsive: > >>>> use a reasonable sleep time after forcing the deassert of the MDIO > >>>> reset signal. > >>>> Once done, free the gpio descriptor to allow managing it later. > >>> This has been discussed before. The problem is, it is not just a reset > >>> GPIO. There could also be a clock which needs turning on, a regulator, > >>> and/or a linux reset controller. And what order do you turn these on? > >>> > >>> The conclusions of the discussion is you assume the device cannot be > >>> found by enumeration, and you put the ID in the compatible. That is > >>> enough to get the driver to load, and the driver can then turn > >>> everything on in the correct order, with the correct delays, etc. > >> I've been running into this same problem again and again over the past > >> years. > >> > >> Specifying the ID as part of the compatible string works for clause 22 > >> PHYs, but for clause 45 PHYs it does not work. The code always wants to > >> read the ID from the PHY itself. But I do not understand things well > >> enough to tell whether that's a fundamental restriction of C45 or just > >> our implementation and the implementation can be changed to fix it. > >> > >> Do you have some thoughts on this? > >> > > IMHO, since the framework allows defining the reset GPIO, it does not sound > > reasonable to manage it only after checking if the PHY can communicate: > > if the reset is asserted, the PHY cannot communicate at all. > > This patch just ensures that, if the reset GPIO is defined, it's not asserted > > while checking the communication. > > I fully agree with you and I think this is the right approach, cause it > is required to make systems work. But I've seen two attempts in the past > that did the very same thing and they always got rejected. I can't find > the patches anymore, but I think one was maybe 2 years ago. > Rejection is always a chance ;) As long I can understand the reasons, I can at least try improving this patch.
On Sun, Jan 15, 2023 at 6:08 PM Andrew Lunn <andrew@lunn.ch> wrote: > On Sun, Jan 15, 2023 at 05:10:06PM +0100, Pierluigi Passaro wrote: > > When the reset gpio is defined within the node of the device tree > > describing the PHY, the reset is initialized and managed only after > > calling the fwnode_mdiobus_phy_device_register function. > > However, before calling it, the MDIO communication is checked by the > > get_phy_device function. > > When this happens and the reset GPIO was somehow previously set down, > > the get_phy_device function fails, preventing the PHY detection. > > These changes force the deassert of the MDIO reset signal before > > checking the MDIO channel. > > The PHY may require a minimum deassert time before being responsive: > > use a reasonable sleep time after forcing the deassert of the MDIO > > reset signal. > > Once done, free the gpio descriptor to allow managing it later. > > This has been discussed before. The problem is, it is not just a reset > GPIO. There could also be a clock which needs turning on, a regulator, > and/or a linux reset controller. And what order do you turn these on? > > The conclusion of the discussion is you assume the device cannot be > found by enumeration, and you put the ID in the compatible. That is > enough to get the driver to load, and the driver can then turn > everything on in the correct order, with the correct delays, etc. > Can you provide any reference to this discussion? From our investigation, the MDIO communication is checked before managing the "reset" gpio . This behaviour is generally not visible, but easily reproducible with all NXP platforms with dual fec (iMX28, iMX6UL, iMX7, iMX8QM, iMX8QXP) where the MDIO bus is owned by the 1st interface but shared with the 2nd. When the 1st interface is probed, this causes the probe of the MDIO bus when the 2nd interface is not yet set up. Here a reference configuration https://github.com/varigit/linux-imx/blob/5.15-2.0.x-imx_var01/arch/arm64/boot/dts/freescale/imx8qm-var-spear.dtsi#L168-L219 Without this patch, the above settings can fail simply forcing the reset GPIOs to zero in u-boot. Please let me know if further details are needed. > > I think there has been some work on generic power sequencing. I've not > being following it, so I've no idea how far it has got. If that could > be used to solve this problem for all the possible controls of a PHY, > i would be open for such patches. > > Andrew
> This behaviour is generally not visible, but easily reproducible with all NXP > platforms with dual fec (iMX28, iMX6UL, iMX7, iMX8QM, iMX8QXP) > where the MDIO bus is owned by the 1st interface but shared with the 2nd. > When the 1st interface is probed, this causes the probe of the MDIO bus > when the 2nd interface is not yet set up. This sounds like a different issue. We need to split the problem up into two. 1) Does probing the MDIO bus find both PHYs? 2) Do the MACs get linked to the PHYs. If the reset is asserted at the point the MDIO bus is probed, you probably don't find the PHY because it does not respond to register reads. Your patch probably ensures it is out of reset so it is enumerated. For fec1, if the PHY is found during probe, connecting to the PHY will work without issues. However, fec2 can potentially have ordering issues. Has the MDIO bus finished being probed by the time fec2 looks for it? If it is not there you want to return -EPROBE_DEFERED so that the driver code will try again later. There have been patches to do with ordering recently, but they have been more to do with suspend/resume. So please make sure you are testing net-next, if ordering is your real problem. You also appear to be missing a lot of stable patches, so please bring you kernel up to date on the 5.15 branch, you are way out of date. Andrew
On Sun, Jan 15, 2023 at 8:02 PM Andrew Lunn <andrew@lunn.ch> wrote: > > This behaviour is generally not visible, but easily reproducible with all NXP > > platforms with dual fec (iMX28, iMX6UL, iMX7, iMX8QM, iMX8QXP) > > where the MDIO bus is owned by the 1st interface but shared with the 2nd. > > When the 1st interface is probed, this causes the probe of the MDIO bus > > when the 2nd interface is not yet set up. > > This sounds like a different issue. > > We need to split the problem up into two. > > 1) Does probing the MDIO bus find both PHYs? > > 2) Do the MACs get linked to the PHYs. > > If the reset is asserted at the point the MDIO bus is probed, you > probably don't find the PHY because it does not respond to register > reads. Your patch probably ensures it is out of reset so it is > enumerated. > You are perfectly right: this patch fixes only the 1st problem. For the 2nd problem, I've already sent a dedicated patch: https://lore.kernel.org/all/20230115174910.18353-1-pierluigi.p@variscite.com/ > > For fec1, if the PHY is found during probe, connecting to the PHY will > work without issues. However, fec2 can potentially have ordering > issues. Has the MDIO bus finished being probed by the time fec2 looks > for it? If it is not there you want to return -EPROBE_DEFERED so that > the driver code will try again later. > > There have been patches to do with ordering recently, but they have > been more to do with suspend/resume. So please make sure you are > testing net-next, if ordering is your real problem. You also appear to > be missing a lot of stable patches, so please bring you kernel up to > date on the 5.15 branch, you are way out of date. > > Andrew
© 2016 - 2025 Red Hat, Inc.