diff options
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus')
3 files changed, 15 insertions, 14 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c index 612ec39fb9..ad0dd16ff3 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c | |||
@@ -79,7 +79,7 @@ bool button_debug_screen(void) | |||
79 | lcd_putsf(0, 1, "RMI: id=%s p=%x s=%x", product_id, func_presence, sensor_prop); | 79 | lcd_putsf(0, 1, "RMI: id=%s p=%x s=%x", product_id, func_presence, sensor_prop); |
80 | lcd_putsf(0, 2, "xmax=%d ymax=%d res=%d", x_max, y_max, sensor_resol); | 80 | lcd_putsf(0, 2, "xmax=%d ymax=%d res=%d", x_max, y_max, sensor_resol); |
81 | lcd_putsf(0, 3, "attn=%d ctl=%x int=%x", | 81 | lcd_putsf(0, 3, "attn=%d ctl=%x int=%x", |
82 | imx233_pinctrl_get_gpio_mask(0, 0x08000000) ? 0 : 1, | 82 | imx233_pinctrl_get_gpio(0, 27) ? 0 : 1, |
83 | rmi_read_single(RMI_DEVICE_CONTROL), | 83 | rmi_read_single(RMI_DEVICE_CONTROL), |
84 | rmi_read_single(RMI_INTERRUPT_REQUEST)); | 84 | rmi_read_single(RMI_INTERRUPT_REQUEST)); |
85 | lcd_putsf(0, 4, "sensi: %d min_dist: %d", (int)sensitivity.value, min_dist); | 85 | lcd_putsf(0, 4, "sensi: %d min_dist: %d", (int)sensitivity.value, min_dist); |
@@ -356,7 +356,7 @@ int touchpad_read_device(void) | |||
356 | int button_read_device(void) | 356 | int button_read_device(void) |
357 | { | 357 | { |
358 | int res = 0; | 358 | int res = 0; |
359 | if(!imx233_pinctrl_get_gpio_mask(1, 0x40000000)) | 359 | if(!imx233_pinctrl_get_gpio(1, 30)) |
360 | res |= BUTTON_VOL_DOWN; | 360 | res |= BUTTON_VOL_DOWN; |
361 | /* The imx233 uses the voltage on the PSWITCH pin to detect power up/down | 361 | /* The imx233 uses the voltage on the PSWITCH pin to detect power up/down |
362 | * events as well as recovery mode. Since the power button is the power button | 362 | * events as well as recovery mode. Since the power button is the power button |
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c index ba62ebf59c..15e061103f 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c | |||
@@ -58,12 +58,12 @@ static void i2c_sda_out(bool high) | |||
58 | 58 | ||
59 | static bool i2c_scl_in(void) | 59 | static bool i2c_scl_in(void) |
60 | { | 60 | { |
61 | return imx233_pinctrl_get_gpio_mask(1, 1 << 22); | 61 | return imx233_pinctrl_get_gpio(1, 22); |
62 | } | 62 | } |
63 | 63 | ||
64 | static bool i2c_sda_in(void) | 64 | static bool i2c_sda_in(void) |
65 | { | 65 | { |
66 | return imx233_pinctrl_get_gpio_mask(1, 1 << 24); | 66 | return imx233_pinctrl_get_gpio(1, 24); |
67 | } | 67 | } |
68 | 68 | ||
69 | static void i2c_delay(int d) | 69 | static void i2c_delay(int d) |
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c index a99260f105..3fd63de623 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c | |||
@@ -73,7 +73,7 @@ static void setup_lcd_pins(bool use_lcdif) | |||
73 | imx233_pinctrl_acquire(1, 21, "lcd cs"); | 73 | imx233_pinctrl_acquire(1, 21, "lcd cs"); |
74 | imx233_pinctrl_acquire(1, 23, "lcd enable"); | 74 | imx233_pinctrl_acquire(1, 23, "lcd enable"); |
75 | imx233_pinctrl_acquire(1, 25, "lcd vsync"); | 75 | imx233_pinctrl_acquire(1, 25, "lcd vsync"); |
76 | imx233_pinctrl_acquire_mask(1, 0x3ffff, "lcd data"); | 76 | //imx233_pinctrl_acquire_mask(1, 0x3ffff, "lcd data"); |
77 | if(use_lcdif) | 77 | if(use_lcdif) |
78 | { | 78 | { |
79 | imx233_pinctrl_set_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */ | 79 | imx233_pinctrl_set_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */ |
@@ -113,10 +113,10 @@ static void setup_lcd_pins_i80(bool i80) | |||
113 | imx233_pinctrl_set_function(1, 21, PINCTRL_FUNCTION_GPIO); /* lcd_cs */ | 113 | imx233_pinctrl_set_function(1, 21, PINCTRL_FUNCTION_GPIO); /* lcd_cs */ |
114 | imx233_pinctrl_set_function(1, 23, PINCTRL_FUNCTION_GPIO); /* lcd_enable */ | 114 | imx233_pinctrl_set_function(1, 23, PINCTRL_FUNCTION_GPIO); /* lcd_enable */ |
115 | /* lcd_{rs,wr,cs,enable} */ | 115 | /* lcd_{rs,wr,cs,enable} */ |
116 | imx233_pinctrl_enable_gpio_mask(1, (1 << 19) | (1 << 20) | (1 << 21) | (1 << 23), true); | 116 | HW_PINCTRL_DOEn_SET(1) = (1 << 19) | (1 << 20) | (1 << 21) | (1 << 23); |
117 | imx233_pinctrl_set_gpio_mask(1, (1 << 19) | (1 << 20) | (1 << 21) | (1 << 23), true); | 117 | HW_PINCTRL_DOUTn_SET(1) = (1 << 19) | (1 << 20) | (1 << 21) | (1 << 23); |
118 | 118 | ||
119 | imx233_pinctrl_enable_gpio_mask(1, 0x3ffff, false); /* lcd_d{0-17} */ | 119 | HW_PINCTRL_DOEn_CLR(1) = 0x3ffff; /* lcd_d{0-17} */ |
120 | HW_PINCTRL_MUXSELn_SET(2) = 0xffffffff; /* lcd_d{0-15} as GPIO */ | 120 | HW_PINCTRL_MUXSELn_SET(2) = 0xffffffff; /* lcd_d{0-15} as GPIO */ |
121 | imx233_pinctrl_set_function(1, 16, PINCTRL_FUNCTION_GPIO); /* lcd_d16 */ | 121 | imx233_pinctrl_set_function(1, 16, PINCTRL_FUNCTION_GPIO); /* lcd_d16 */ |
122 | imx233_pinctrl_set_function(1, 17, PINCTRL_FUNCTION_GPIO); /* lcd_d17 */ | 122 | imx233_pinctrl_set_function(1, 17, PINCTRL_FUNCTION_GPIO); /* lcd_d17 */ |
@@ -125,7 +125,8 @@ static void setup_lcd_pins_i80(bool i80) | |||
125 | } | 125 | } |
126 | else | 126 | else |
127 | { | 127 | { |
128 | imx233_pinctrl_set_gpio_mask(1, (1 << 19) | (1 << 20) | (1 << 21) | (1 << 23), true); | 128 | HW_PINCTRL_DOUTn_SET(1) = (1 << 19) | (1 << 20) | (1 << 21) | (1 << 23); |
129 | |||
129 | imx233_pinctrl_set_drive(1, 19, PINCTRL_DRIVE_4mA); /* lcd_rs */ | 130 | imx233_pinctrl_set_drive(1, 19, PINCTRL_DRIVE_4mA); /* lcd_rs */ |
130 | imx233_pinctrl_set_drive(1, 20, PINCTRL_DRIVE_4mA); /* lcd_wr */ | 131 | imx233_pinctrl_set_drive(1, 20, PINCTRL_DRIVE_4mA); /* lcd_wr */ |
131 | imx233_pinctrl_set_drive(1, 21, PINCTRL_DRIVE_4mA); /* lcd_cs */ | 132 | imx233_pinctrl_set_drive(1, 21, PINCTRL_DRIVE_4mA); /* lcd_cs */ |
@@ -133,7 +134,7 @@ static void setup_lcd_pins_i80(bool i80) | |||
133 | imx233_pinctrl_set_function(1, 19, PINCTRL_FUNCTION_MAIN); /* lcd_rs */ | 134 | imx233_pinctrl_set_function(1, 19, PINCTRL_FUNCTION_MAIN); /* lcd_rs */ |
134 | imx233_pinctrl_set_function(1, 20, PINCTRL_FUNCTION_MAIN); /* lcd_wr */ | 135 | imx233_pinctrl_set_function(1, 20, PINCTRL_FUNCTION_MAIN); /* lcd_wr */ |
135 | imx233_pinctrl_set_function(1, 21, PINCTRL_FUNCTION_MAIN); /* lcd_cs */ | 136 | imx233_pinctrl_set_function(1, 21, PINCTRL_FUNCTION_MAIN); /* lcd_cs */ |
136 | imx233_pinctrl_enable_gpio_mask(1, 0x3ffff, false); /* lcd_d{0-17} */ | 137 | HW_PINCTRL_DOEn_CLR(1) = 0x3ffff; /* lcd_d{0-17} */ |
137 | HW_PINCTRL_MUXSELn_CLR(2) = 0xffffffff; /* lcd_d{0-15} as lcd_d{0-15} */ | 138 | HW_PINCTRL_MUXSELn_CLR(2) = 0xffffffff; /* lcd_d{0-15} as lcd_d{0-15} */ |
138 | imx233_pinctrl_set_function(1, 16, PINCTRL_FUNCTION_MAIN); /* lcd_d16 */ | 139 | imx233_pinctrl_set_function(1, 16, PINCTRL_FUNCTION_MAIN); /* lcd_d16 */ |
139 | imx233_pinctrl_set_function(1, 17, PINCTRL_FUNCTION_MAIN); /* lcd_d17 */ | 140 | imx233_pinctrl_set_function(1, 17, PINCTRL_FUNCTION_MAIN); /* lcd_d17 */ |
@@ -182,7 +183,7 @@ static uint32_t i80_read_register(uint32_t data_out) | |||
182 | imx233_pinctrl_set_gpio(1, 19, true); /* lcd_rs */ | 183 | imx233_pinctrl_set_gpio(1, 19, true); /* lcd_rs */ |
183 | imx233_pinctrl_set_gpio(1, 23, true); /* lcd_enable */ | 184 | imx233_pinctrl_set_gpio(1, 23, true); /* lcd_enable */ |
184 | imx233_pinctrl_set_gpio(1, 20, true); /* lcd_wr */ | 185 | imx233_pinctrl_set_gpio(1, 20, true); /* lcd_wr */ |
185 | imx233_pinctrl_enable_gpio_mask(1, 0x3ffff, true); /* lcd_d{0-17} */ | 186 | HW_PINCTRL_DOEn_SET(1) = 0x3ffff; /* lcd_d{0-17} */ |
186 | udelay(2); | 187 | udelay(2); |
187 | imx233_pinctrl_set_gpio(1, 19, false); /* lcd_rs */ | 188 | imx233_pinctrl_set_gpio(1, 19, false); /* lcd_rs */ |
188 | udelay(1); | 189 | udelay(1); |
@@ -190,11 +191,11 @@ static uint32_t i80_read_register(uint32_t data_out) | |||
190 | udelay(1); | 191 | udelay(1); |
191 | imx233_pinctrl_set_gpio(1, 20, false); /* lcd_wr */ | 192 | imx233_pinctrl_set_gpio(1, 20, false); /* lcd_wr */ |
192 | udelay(1); | 193 | udelay(1); |
193 | imx233_pinctrl_set_gpio_mask(1, data_out & 0x3ffff, true); /* lcd_d{0-17} */ | 194 | HW_PINCTRL_DOUTn_SET(1) = data_out & 0x3ffff; /* lcd_d{0-17} */ |
194 | udelay(1); | 195 | udelay(1); |
195 | imx233_pinctrl_set_gpio(1, 20, true); /* lcd_wr */ | 196 | imx233_pinctrl_set_gpio(1, 20, true); /* lcd_wr */ |
196 | udelay(3); | 197 | udelay(3); |
197 | imx233_pinctrl_enable_gpio_mask(1, 0x3ffff, false); /* lcd_d{0-17} */ | 198 | HW_PINCTRL_DOUTn_CLR(1) = 0x3ffff; /* lcd_d{0-17} */ |
198 | udelay(2); | 199 | udelay(2); |
199 | imx233_pinctrl_set_gpio(1, 23, false); /* lcd_enable */ | 200 | imx233_pinctrl_set_gpio(1, 23, false); /* lcd_enable */ |
200 | udelay(1); | 201 | udelay(1); |
@@ -204,7 +205,7 @@ static uint32_t i80_read_register(uint32_t data_out) | |||
204 | udelay(3); | 205 | udelay(3); |
205 | imx233_pinctrl_set_gpio(1, 23, false); /* lcd_enable */ | 206 | imx233_pinctrl_set_gpio(1, 23, false); /* lcd_enable */ |
206 | udelay(2); | 207 | udelay(2); |
207 | uint32_t data_in = imx233_pinctrl_get_gpio_mask(1, 0x3ffff); /* lcd_d{0-17} */ | 208 | uint32_t data_in = HW_PINCTRL_DINn(1) & 0x3ffff; /* lcd_d{0-17} */ |
208 | udelay(1); | 209 | udelay(1); |
209 | imx233_pinctrl_set_gpio(1, 23, true); /* lcd_enable */ | 210 | imx233_pinctrl_set_gpio(1, 23, true); /* lcd_enable */ |
210 | udelay(1); | 211 | udelay(1); |