Skip to content

Commit a433d91

Browse files
committed
thingino-kopt: add an I2C2 pin selection for T23
Mirrors the I2C1 choice now that the kernel offers PB20/PB21 and PB27/PB28 on T23. Defaults to PB20/PB21, which is what the kernel choice already falls through to.
1 parent ea6f082 commit a433d91

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

package/thingino-kopt/Config.in

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,28 @@ config BR2_PACKAGE_THINGINO_KOPT_I2C_BUS2
382382
help
383383
Enables I2C2 on the SoC
384384

385+
if BR2_PACKAGE_THINGINO_KOPT_I2C_BUS2 && BR2_SOC_FAMILY = "t23"
386+
387+
choice
388+
prompt "I2C2 Pin Selection"
389+
default BR2_PACKAGE_THINGINO_KOPT_I2C_BUS2_PB20_PB21
390+
391+
config BR2_PACKAGE_THINGINO_KOPT_I2C_BUS2_PB20_PB21
392+
bool "I2C2 on PB20/PB21"
393+
help
394+
Routes I2C2 to GPIO PB20 and PB21.
395+
396+
config BR2_PACKAGE_THINGINO_KOPT_I2C_BUS2_PB27_PB28
397+
bool "I2C2 on PB27/PB28"
398+
help
399+
Routes I2C2 to GPIO PB27 and PB28.
400+
401+
PB27 is shared with the OTG DRVVBUS pin.
402+
403+
endchoice
404+
405+
endif
406+
385407
config BR2_PACKAGE_THINGINO_KOPT_USB_MASS_STORAGE
386408
bool "USB Storage"
387409
depends on BR2_PACKAGE_THINGINO_KOPT

package/thingino-kopt/thingino-kopt.mk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,18 @@ define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C2
275275
endef
276276
endif
277277

278+
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_I2C_BUS2_PB20_PB21),y)
279+
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C2_PB20_PB21
280+
$(call KCONFIG_ENABLE_OPT,CONFIG_I2C2_PB20_PB21)
281+
endef
282+
endif
283+
284+
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_I2C_BUS2_PB27_PB28),y)
285+
define THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C2_PB27_PB28
286+
$(call KCONFIG_ENABLE_OPT,CONFIG_I2C2_PB27_PB28)
287+
endef
288+
endif
289+
278290
################ CIFS FS #########################
279291

280292
ifeq ($(BR2_PACKAGE_THINGINO_KOPT_CIFS),y)
@@ -570,6 +582,8 @@ define THINGINO_KOPT_LINUX_CONFIG_FIXUPS
570582
$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C1_PB25_PB26)
571583
$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C1_PA16_PA17)
572584
$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C2)
585+
$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C2_PB20_PB21)
586+
$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_I2C2_PB27_PB28)
573587
$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_USB_MASS_STORAGE)
574588
$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_EXTFS)
575589
$(call THINGINO_KOPT_LINUX_CONFIG_FIXUPS_MMC_BOOT)

0 commit comments

Comments
 (0)