This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12883 ) Change subject: firmware/board/gta0x: fix GPIO and ASIC_CONF_REG configuration ...................................................................... firmware/board/gta0x: fix GPIO and ASIC_CONF_REG configuration Most Calypso peripheral interface signals are unconnected on Openmoko GTA0x. Let's configure them to be GPIOs in IO_CONF_REG, then configure them to be outputs in IO_CNTL_REG, then set the outputs to 0 in ARMIO_LATCH_OUT. Change-Id: I306ffacb623d2b06a188f84026ccadab408d1676 --- M src/target/firmware/board/gta0x/init.c 1 file changed, 10 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/src/target/firmware/board/gta0x/init.c b/src/target/firmware/board/gta0x/init.c index 4f49e80..b93f79c 100644 --- a/src/target/firmware/board/gta0x/init.c +++ b/src/target/firmware/board/gta0x/init.c @@ -49,29 +49,26 @@ #define ARMIO_LATCH_OUT 0xfffe4802 #define IO_CNTL_REG 0xfffe4804 #define ASIC_CONF_REG 0xfffef008 +#define IO_CONF_REG 0xfffef00a static void board_io_init(void) { uint16_t reg; reg = readw(ASIC_CONF_REG); - /* LCD Set I/O(3) / SA0 to I/O(3) mode */ - reg &= ~(1 << 10); - /* Set function pins to I2C Mode */ - reg |= ((1 << 12) | (1 << 7)); /* SCL / SDA */ /* TWL3025: Set SPI+RIF RX clock to rising edge */ reg |= (1 << 13) | (1 << 14); writew(reg, ASIC_CONF_REG); - /* LCD Set I/O(3) to output mode */ - reg = readw(IO_CNTL_REG); - reg &= ~(1 << 3); - writew(reg, IO_CNTL_REG); - - /* LCD Set I/O(3) output low */ - reg = readw(ARMIO_LATCH_OUT); - reg &= ~(1 << 3); - writew(reg, ARMIO_LATCH_OUT); + /* + * Most Calypso peripheral interface signals are unconnected + * on this modem. We configure them to be GPIOs in IO_CONF_REG, + * then configure them to be outputs in IO_CNTL_REG, then set + * the outputs to 0 in ARMIO_LATCH_OUT. + */ + writew(0x03F5, IO_CONF_REG); + writew(0xC000, IO_CNTL_REG); + writew(0x0000, ARMIO_LATCH_OUT); } void board_init(int with_irq) -- To view, visit https://gerrit.osmocom.org/12883 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I306ffacb623d2b06a188f84026ccadab408d1676 Gerrit-Change-Number: 12883 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max <msuraev at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190214/b724cfe5/attachment.htm>