gpio debug wip
Change-Id: I5776168790ad3b4d1d9cfdca21dc09000471369b
diff --git a/system/dev/gpio/aml-axg-gpio/aml-axg-gpio.c b/system/dev/gpio/aml-axg-gpio/aml-axg-gpio.c
index fcf095e..d302122 100644
--- a/system/dev/gpio/aml-axg-gpio/aml-axg-gpio.c
+++ b/system/dev/gpio/aml-axg-gpio/aml-axg-gpio.c
@@ -184,6 +184,8 @@
reg += block->output_offset;
pinindex += block->output_shift;
+printf("aml_gpio_write index %u value %d offset %u pinindex %u\n", index, value, block->output_offset, pinindex);
+
mtx_lock(&block->lock);
uint32_t regval = readl(reg);
diff --git a/system/dev/gpio/aml-axg-gpio/s905d2-blocks.h b/system/dev/gpio/aml-axg-gpio/s905d2-blocks.h
index bdbd94a..c9566ea 100644
--- a/system/dev/gpio/aml-axg-gpio/s905d2-blocks.h
+++ b/system/dev/gpio/aml-axg-gpio/s905d2-blocks.h
@@ -163,7 +163,7 @@
.mux_offset = S905D2_AO_RTI_PINMUX_REG0,
.oen_offset = S905D2_AO_GPIO_O_EN_N,
.input_offset = S905D2_AO_GPIO_I,
- .output_offset = S905D2_AO_GPIO_O,
+ .output_offset = S905D2_AO_GPIO_O_EN_N,
.output_shift = 16,
.mmio_index = 0,
.lock = MTX_INIT,
@@ -175,7 +175,7 @@
.mux_offset = S905D2_AO_RTI_PINMUX_REG1,
.oen_offset = S905D2_AO_GPIO_O_EN_N,
.input_offset = S905D2_AO_GPIO_I,
- .output_offset = S905D2_AO_GPIO_O,
+ .output_offset = S905D2_AO_GPIO_O_EN_N,
.output_shift = 16,
.mmio_index = 0,
.lock = MTX_INIT,
diff --git a/system/dev/soc/amlogic/include/soc/aml-s905d2/s905d2-gpio.h b/system/dev/soc/amlogic/include/soc/aml-s905d2/s905d2-gpio.h
index 3a8ef5d..40e8152 100644
--- a/system/dev/soc/amlogic/include/soc/aml-s905d2/s905d2-gpio.h
+++ b/system/dev/soc/amlogic/include/soc/aml-s905d2/s905d2-gpio.h
@@ -65,7 +65,6 @@
#define S905D2_AO_GPIO_O_EN_N 0x09
#define S905D2_AO_GPIO_I 0x0a
-#define S905D2_AO_GPIO_O 0x0d
#define S905D2_AO_RTI_PINMUX_REG0 0x05
#define S905D2_AO_RTI_PINMUX_REG1 0x06