diff options
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus')
5 files changed, 20 insertions, 2 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c index 6e13c0419c..7f181a9672 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/backlight-fuzeplus.c | |||
@@ -41,6 +41,7 @@ void _backlight_set_brightness(int brightness) | |||
41 | 41 | ||
42 | bool _backlight_init(void) | 42 | bool _backlight_init(void) |
43 | { | 43 | { |
44 | imx233_pinctrl_acquire_pin(1, 28, "backlight"); | ||
44 | imx233_set_pin_function(1, 28, PINCTRL_FUNCTION_GPIO); | 45 | imx233_set_pin_function(1, 28, PINCTRL_FUNCTION_GPIO); |
45 | imx233_set_pin_drive_strength(1, 28, PINCTRL_DRIVE_8mA); | 46 | imx233_set_pin_drive_strength(1, 28, PINCTRL_DRIVE_8mA); |
46 | imx233_enable_gpio_output(1, 28, true); | 47 | imx233_enable_gpio_output(1, 28, true); |
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c index 26e5a0a102..86bb00f4a5 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c | |||
@@ -301,7 +301,8 @@ void button_init_device(void) | |||
301 | * The B0P26 line seems to be related to the touchpad | 301 | * The B0P26 line seems to be related to the touchpad |
302 | */ | 302 | */ |
303 | 303 | ||
304 | /* touchpad CE ? */ | 304 | /* touchpad power */ |
305 | imx233_pinctrl_acquire_pin(0, 26, "touchpad power"); | ||
305 | imx233_set_pin_function(0, 26, PINCTRL_FUNCTION_GPIO); | 306 | imx233_set_pin_function(0, 26, PINCTRL_FUNCTION_GPIO); |
306 | imx233_enable_gpio_output(0, 26, false); | 307 | imx233_enable_gpio_output(0, 26, false); |
307 | imx233_set_pin_drive_strength(0, 26, PINCTRL_DRIVE_8mA); | 308 | imx233_set_pin_drive_strength(0, 26, PINCTRL_DRIVE_8mA); |
@@ -324,10 +325,12 @@ void button_init_device(void) | |||
324 | create_thread(rmi_thread, rmi_stack, sizeof(rmi_stack), 0, | 325 | create_thread(rmi_thread, rmi_stack, sizeof(rmi_stack), 0, |
325 | rmi_thread_name IF_PRIO(, PRIORITY_USER_INTERFACE) IF_COP(, CPU)); | 326 | rmi_thread_name IF_PRIO(, PRIORITY_USER_INTERFACE) IF_COP(, CPU)); |
326 | /* enable interrupt */ | 327 | /* enable interrupt */ |
328 | imx233_pinctrl_acquire_pin(0, 27, "touchpad int"); | ||
327 | imx233_set_pin_function(0, 27, PINCTRL_FUNCTION_GPIO); | 329 | imx233_set_pin_function(0, 27, PINCTRL_FUNCTION_GPIO); |
328 | imx233_enable_gpio_output(0, 27, false); | 330 | imx233_enable_gpio_output(0, 27, false); |
329 | imx233_setup_pin_irq(0, 27, true, true, false, &rmi_attn_cb); | 331 | imx233_setup_pin_irq(0, 27, true, true, false, &rmi_attn_cb); |
330 | /* Volume down */ | 332 | /* Volume down */ |
333 | imx233_pinctrl_acquire_pin(1, 30, "volume down"); | ||
331 | imx233_set_pin_function(1, 30, PINCTRL_FUNCTION_GPIO); | 334 | imx233_set_pin_function(1, 30, PINCTRL_FUNCTION_GPIO); |
332 | imx233_enable_gpio_output(1, 30, false); | 335 | imx233_enable_gpio_output(1, 30, false); |
333 | } | 336 | } |
@@ -336,6 +339,10 @@ void button_init_device(void) | |||
336 | 339 | ||
337 | void button_init_device(void) | 340 | void button_init_device(void) |
338 | { | 341 | { |
342 | /* Volume down */ | ||
343 | imx233_pinctrl_acquire_pin(1, 30, "volume down"); | ||
344 | imx233_set_pin_function(1, 30, PINCTRL_FUNCTION_GPIO); | ||
345 | imx233_enable_gpio_output(1, 30, false); | ||
339 | } | 346 | } |
340 | 347 | ||
341 | int touchpad_read_device(void) | 348 | int touchpad_read_device(void) |
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 417f70e406..ee63cd35f6 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c | |||
@@ -87,6 +87,8 @@ struct i2c_interface fmradio_i2c = | |||
87 | 87 | ||
88 | void fmradio_i2c_init(void) | 88 | void fmradio_i2c_init(void) |
89 | { | 89 | { |
90 | imx233_pinctrl_acquire_pin(1, 24, "fmradio i2c"); | ||
91 | imx233_pinctrl_acquire_pin(1, 22, "fmradio i2c"); | ||
90 | imx233_set_pin_function(1, 24, PINCTRL_FUNCTION_GPIO); | 92 | imx233_set_pin_function(1, 24, PINCTRL_FUNCTION_GPIO); |
91 | imx233_set_pin_function(1, 22, PINCTRL_FUNCTION_GPIO); | 93 | imx233_set_pin_function(1, 22, PINCTRL_FUNCTION_GPIO); |
92 | fmradio_i2c_bus = i2c_add_node(&fmradio_i2c); | 94 | fmradio_i2c_bus = i2c_add_node(&fmradio_i2c); |
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c index b83c49d092..20b46fdc63 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c | |||
@@ -56,6 +56,13 @@ static void setup_lcd_pins(bool use_lcdif) | |||
56 | /* WARNING | 56 | /* WARNING |
57 | * the B1P22 and B1P24 pins are used by the tuner i2c! Do NOT drive | 57 | * the B1P22 and B1P24 pins are used by the tuner i2c! Do NOT drive |
58 | * them as lcd_dotclk and lcd_hsync or it will break the tuner! */ | 58 | * them as lcd_dotclk and lcd_hsync or it will break the tuner! */ |
59 | imx233_pinctrl_acquire_pin(1, 18, "lcd reset"); | ||
60 | imx233_pinctrl_acquire_pin(1, 19, "lcd rs"); | ||
61 | imx233_pinctrl_acquire_pin(1, 20, "lcd wr"); | ||
62 | imx233_pinctrl_acquire_pin(1, 21, "lcd cs"); | ||
63 | imx233_pinctrl_acquire_pin(1, 23, "lcd enable"); | ||
64 | imx233_pinctrl_acquire_pin(1, 25, "lcd vsync"); | ||
65 | imx233_pinctrl_acquire_pin_mask(1, 0x3ffff, "lcd data"); | ||
59 | if(use_lcdif) | 66 | if(use_lcdif) |
60 | { | 67 | { |
61 | imx233_set_pin_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */ | 68 | imx233_set_pin_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */ |
@@ -71,7 +78,7 @@ static void setup_lcd_pins(bool use_lcdif) | |||
71 | else | 78 | else |
72 | { | 79 | { |
73 | __REG_SET(HW_PINCTRL_MUXSEL(2)) = 0xffffffff; /* lcd_d{0-15} */ | 80 | __REG_SET(HW_PINCTRL_MUXSEL(2)) = 0xffffffff; /* lcd_d{0-15} */ |
74 | imx233_enable_gpio_output_mask(1, 0x3ffffff, false); /* lcd_{d{0-17},reset,rs,wr,cs,dotclk,enable,hsync,vsync} */ | 81 | imx233_enable_gpio_output_mask(1, 0x2bfffff, false); /* lcd_{d{0-17},reset,rs,wr,cs,enable,vsync} */ |
75 | imx233_set_pin_function(1, 16, PINCTRL_FUNCTION_GPIO); /* lcd_d16 */ | 82 | imx233_set_pin_function(1, 16, PINCTRL_FUNCTION_GPIO); /* lcd_d16 */ |
76 | imx233_set_pin_function(1, 17, PINCTRL_FUNCTION_GPIO); /* lcd_d17 */ | 83 | imx233_set_pin_function(1, 17, PINCTRL_FUNCTION_GPIO); /* lcd_d17 */ |
77 | imx233_set_pin_function(1, 19, PINCTRL_FUNCTION_GPIO); /* lcd_rs */ | 84 | imx233_set_pin_function(1, 19, PINCTRL_FUNCTION_GPIO); /* lcd_rs */ |
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c index 71c45b0676..89dbfd3cb7 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c | |||
@@ -33,6 +33,7 @@ bool tuner_power(bool enable) | |||
33 | if(enable != tuner_enable) | 33 | if(enable != tuner_enable) |
34 | { | 34 | { |
35 | /* CE is B029 (active high) */ | 35 | /* CE is B029 (active high) */ |
36 | imx233_pinctrl_acquire_pin(0, 29, "tuner power"); | ||
36 | imx233_set_pin_function(0, 29, PINCTRL_FUNCTION_GPIO); | 37 | imx233_set_pin_function(0, 29, PINCTRL_FUNCTION_GPIO); |
37 | imx233_set_pin_drive_strength(0, 29, PINCTRL_DRIVE_4mA); | 38 | imx233_set_pin_drive_strength(0, 29, PINCTRL_DRIVE_4mA); |
38 | imx233_enable_gpio_output(0, 29, enable); | 39 | imx233_enable_gpio_output(0, 29, enable); |