Skip to content

Commit 8cf27ec

Browse files
committed
boardinfo: Pull up Project ID pins.
Change-Id: I7fdf09da97de645acba9d63791cd2107afbfcfe4
1 parent 3e1715c commit 8cf27ec

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

drivers/boardinfo/boardinfo.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#include <linux/of_gpio.h>
66
#include <linux/proc_fs.h>
77

8+
#define RK3288_GRF_GPIO2A_P 0x0150
9+
810
static int hw_id0, hw_id1, hw_id2;
911
static int pid_id0, pid_id1, pid_id2;
1012
static int ddr_id0, ddr_id1, ddr_id2;
@@ -163,6 +165,18 @@ static int board_info_probe(struct platform_device *pdev)
163165
int ret;
164166
struct proc_dir_entry* file;
165167

168+
void *regs;
169+
/* Pull up GPIO2 A1 A2 A3*/
170+
regs = ioremap(0xff770000, 64*1024);
171+
if (regs == NULL) {
172+
printk("[boardinfo] ioremap failed");
173+
return -ENODEV;
174+
}
175+
writel((readl(regs + RK3288_GRF_GPIO2A_P) & ~(0x3f << 18) & ~(0x3f << 2))
176+
| (0x3f << 18) | (0x15 << 2), regs + RK3288_GRF_GPIO2A_P);
177+
178+
iounmap(regs);
179+
166180
hw_id0 = of_get_named_gpio(dev->of_node, "hw-id0", 0);
167181
if (!gpio_is_valid(hw_id0)) {
168182
printk("No hw-id0 pin available in board-info\n");

0 commit comments

Comments
 (0)