mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
qca:ipq806x: Adding board support code for ipq806x
Added dts and initial board support for ipq806x. Change-Id: I33992413905a0399ea3d6dfbd606c8e7ec30b6bf Signed-off-by: Aditya Kumar Patra S <apatr@codeaurora.org>
This commit is contained in:
parent
c56a3e8e2a
commit
c6cc859ca4
8 changed files with 176 additions and 0 deletions
3
arch/arm/cpu/armv7/qca/ipq806x/Kconfig
Normal file
3
arch/arm/cpu/armv7/qca/ipq806x/Kconfig
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
config ARCH_IPQ806x
|
||||
bool "QCA IPQ806x SPECIFIC IPs"
|
||||
|
||||
4
arch/arm/cpu/armv7/qca/ipq806x/Makefile
Normal file
4
arch/arm/cpu/armv7/qca/ipq806x/Makefile
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
ccflags-y += -I$(srctree)/board/qca/ipq806x/
|
||||
|
||||
obj-y += clock.o
|
||||
obj-y += gpio.o
|
||||
24
arch/arm/dts/ipq806x-ap148.dts
Normal file
24
arch/arm/dts/ipq806x-ap148.dts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "ipq806x-soc.dtsi"
|
||||
/ {
|
||||
model ="QCA, IPQ806x-AK01";
|
||||
compatible = "qca,ipq806x", "qca,ipq806x-ak01";
|
||||
machid = <0x00000000>;
|
||||
aliases {
|
||||
console = "/serial@16340000";
|
||||
};
|
||||
};
|
||||
|
||||
34
arch/arm/dts/ipq806x-soc.dtsi
Normal file
34
arch/arm/dts/ipq806x-soc.dtsi
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "skeleton.dtsi"
|
||||
|
||||
/ {
|
||||
|
||||
serial@16340000 {
|
||||
compatible = "qca,ipq-uartdm";
|
||||
reg = <0x16340000 0x200>;
|
||||
gsbi_base = <0x16300000>;
|
||||
id = <2>;
|
||||
bit_rate = <0xCC>;
|
||||
};
|
||||
|
||||
timer {
|
||||
gcnt_en = <0x0200A00C>;
|
||||
gcnt_cnt = <0x0200A008>;
|
||||
gpt_freq_hz = <32000>;
|
||||
timer_load_val = <0x00FFFFFF 0xFFFFFFFF>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
15
board/ipq806x/Kconfig
Normal file
15
board/ipq806x/Kconfig
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
if ARCH_IPQ806x
|
||||
|
||||
config SYS_CPU
|
||||
default "ipq806x"
|
||||
|
||||
config SYS_BOARD
|
||||
default "ipq806x"
|
||||
|
||||
config SYS_VENDOR
|
||||
default "qca"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "ipq806x"
|
||||
|
||||
endif
|
||||
3
board/qca/ipq806x/Makefile
Normal file
3
board/qca/ipq806x/Makefile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
obj-y := ipq806x.o
|
||||
|
||||
73
board/qca/ipq806x/ipq806x.c
Normal file
73
board/qca/ipq806x/ipq806x.c
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <environment.h>
|
||||
|
||||
#include "ipq806x.h"
|
||||
#include "../common/qca_common.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
qca_mmc mmc_host;
|
||||
|
||||
void enable_caches(void)
|
||||
{
|
||||
icache_enable();
|
||||
}
|
||||
|
||||
void disable_caches(void)
|
||||
{
|
||||
icache_disable();
|
||||
}
|
||||
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long timer_read_counter(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void reset_cpu(unsigned long a)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
void emmc_clock_config(int mode)
|
||||
{
|
||||
/* TODO: To be filled */
|
||||
}
|
||||
int board_mmc_init(bd_t *bis)
|
||||
{
|
||||
int ret;
|
||||
|
||||
mmc_host.base = MSM_SDC1_BASE;
|
||||
mmc_host.clk_mode = MMC_IDENTIFY_MODE;
|
||||
emmc_clock_config(mmc_host.clk_mode);
|
||||
|
||||
ret = qca_mmc_init(bis, &mmc_host);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
20
board/qca/ipq806x/ipq806x.h
Normal file
20
board/qca/ipq806x/ipq806x.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _IPQ806X_H_
|
||||
#define _IPQ806X_H_
|
||||
|
||||
#include <configs/ipq806x.h>
|
||||
#include <asm/u-boot.h>
|
||||
|
||||
#endif /* _IPQ806X_H_ */
|
||||
Loading…
Add table
Reference in a new issue