-
Notifications
You must be signed in to change notification settings - Fork 1.6k
RK3506 CPU2 is compatible with nuttx #19478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Otpvondoiats
wants to merge
4
commits into
apache:master
Choose a base branch
from
Otpvondoiats:lk-3506
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,036
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
31e6381
drivers/serial/16550: add u16550_consoledev() accessor
Otpvondoiats 4a440fa
arch/arm/rk3506: add Rockchip RK3506 (Cortex-A7) chip support
Otpvondoiats d419c7d
boards/arm/rk3506: add Luckfox Lyra AMP subsystem board
Otpvondoiats a14e645
boards/arm/rk3506: set Luckfox Lyra AMP NuttX RAM to 32MB
Otpvondoiats File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /**************************************************************************** | ||
| * arch/arm/include/rk3506/chip.h | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. The | ||
| * ASF licenses this file to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance with the | ||
| * License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations | ||
| * under the License. | ||
| * | ||
| ****************************************************************************/ | ||
|
|
||
| #ifndef __ARCH_ARM_INCLUDE_RK3506_CHIP_H | ||
| #define __ARCH_ARM_INCLUDE_RK3506_CHIP_H | ||
|
|
||
| /**************************************************************************** | ||
| * Included Files | ||
| ****************************************************************************/ | ||
|
|
||
| #include <nuttx/config.h> | ||
|
|
||
| /**************************************************************************** | ||
| * Pre-processor Prototypes | ||
| ****************************************************************************/ | ||
|
|
||
| /**************************************************************************** | ||
| * Public Types | ||
| ****************************************************************************/ | ||
|
|
||
| /**************************************************************************** | ||
| * Public Data | ||
| ****************************************************************************/ | ||
|
|
||
| /**************************************************************************** | ||
| * Public Functions Prototypes | ||
| ****************************************************************************/ | ||
|
|
||
| #endif /* __ARCH_ARM_INCLUDE_RK3506_CHIP_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| /**************************************************************************** | ||
| * arch/arm/include/rk3506/irq.h | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. The | ||
| * ASF licenses this file to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance with the | ||
| * License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations | ||
| * under the License. | ||
| * | ||
| ****************************************************************************/ | ||
|
|
||
| /* This file should never be included directly but, rather, | ||
| * only indirectly through nuttx/irq.h | ||
| */ | ||
|
|
||
| #ifndef __ARCH_ARM_INCLUDE_RK3506_IRQ_H | ||
| #define __ARCH_ARM_INCLUDE_RK3506_IRQ_H | ||
|
|
||
| /**************************************************************************** | ||
| * Included Files | ||
| ****************************************************************************/ | ||
|
|
||
| /**************************************************************************** | ||
| * Pre-processor Prototypes | ||
| ****************************************************************************/ | ||
|
|
||
| #define NR_IRQS 220 /* Total number of interrupts */ | ||
|
|
||
| /**************************************************************************** | ||
| * Public Types | ||
| ****************************************************************************/ | ||
|
|
||
| /**************************************************************************** | ||
| * Inline functions | ||
| ****************************************************************************/ | ||
|
|
||
| /**************************************************************************** | ||
| * Public Data | ||
| ****************************************************************************/ | ||
|
|
||
| /**************************************************************************** | ||
| * Public Function Prototypes | ||
| ****************************************************************************/ | ||
|
|
||
| #ifndef __ASSEMBLY__ | ||
| #ifdef __cplusplus | ||
| #define EXTERN extern "C" | ||
| extern "C" | ||
| { | ||
| #else | ||
| #define EXTERN extern | ||
| #endif | ||
|
|
||
| #undef EXTERN | ||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
| #endif | ||
|
|
||
| #endif /* __ARCH_ARM_INCLUDE_RK3506_IRQ_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # ############################################################################## | ||
| # arch/arm/src/qemu/CMakeLists.txt | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more contributor | ||
| # license agreements. See the NOTICE file distributed with this work for | ||
| # additional information regarding copyright ownership. The ASF licenses this | ||
| # file to you under the Apache License, Version 2.0 (the "License"); you may not | ||
| # use this file except in compliance with the License. You may obtain a copy of | ||
| # the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| # License for the specific language governing permissions and limitations under | ||
| # the License. | ||
| # | ||
| # ############################################################################## | ||
|
|
||
| set(SRCS rk3506_boot.c rk3506_serial.c rk3506_irq.c rk3506_timer.c) | ||
|
|
||
| if(CONFIG_ARCH_ARMV7A) | ||
| list(APPEND SRCS rk3506_pgalloc.c rk3506_memorymap.c) | ||
| endif() | ||
|
|
||
| if(CONFIG_BUILD_KERNEL) | ||
| list(APPEND SRCS rk3506_pgalloc.c) | ||
| endif() | ||
|
|
||
| if(CONFIG_BUILD_PROTECTED) | ||
| list(APPEND SRCS qemu_userspace.c qemu_allocateheap.c) | ||
| endif() | ||
|
|
||
| target_sources(arch PRIVATE ${SRCS}) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # | ||
| # For a description of the syntax of this configuration file, | ||
| # see the file kconfig-language.txt in the NuttX tools repository. | ||
| # | ||
|
|
||
| if ARCH_CHIP_RK3506 | ||
|
|
||
| menu "RK3506 Chip Selection" | ||
|
|
||
| config RK3506_AMP_SECONDARY | ||
| bool "Run as AMP secondary core (do not init GIC distributor)" | ||
| default y | ||
| ---help--- | ||
| When NuttX runs as an AMP subsystem alongside Linux on the same | ||
| SoC, the GIC distributor is owned/initialized by the Linux side. | ||
| This option makes NuttX initialize only its own GIC CPU interface | ||
| (GICC) and skip the distributor (GICD) initialization, so it does | ||
| not corrupt the configuration set up by Linux. | ||
|
|
||
| config RK3506_UART4 | ||
| bool "UART4 (dw-apb-uart) console" | ||
| default y | ||
| ---help--- | ||
| RK3506 UART4 at 0xff0e0000, used as the NuttX console in the | ||
| default AMP configuration. Pins routed to CPU2 by the Linux | ||
| device tree. | ||
|
|
||
| config RK3506_UART3 | ||
| bool "UART3 (dw-apb-uart)" | ||
| default n | ||
| ---help--- | ||
| RK3506 UART3 at 0xff0d0000, the secondary UART also routed to | ||
| CPU2 by the Linux device tree. | ||
|
|
||
| endmenu # "RK3506 Chip Selection" | ||
|
|
||
| endif # ARCH_CHIP_RK3506 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| ############################################################################ | ||
| # arch/arm/src/qemu/Make.defs | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. The | ||
| # ASF licenses this file to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance with the | ||
| # License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| # License for the specific language governing permissions and limitations | ||
| # under the License. | ||
| # | ||
| ############################################################################ | ||
|
|
||
| ifeq ($(CONFIG_ARCH_ARMV7A),y) | ||
| include armv7-a/Make.defs | ||
| endif | ||
|
|
||
| ifeq ($(CONFIG_ARCH_ARMV7R),y) | ||
| include armv7-r/Make.defs | ||
| endif | ||
|
|
||
| # rk3506-specific C source files | ||
| CHIP_CSRCS = rk3506_boot.c rk3506_serial.c rk3506_irq.c rk3506_timer.c | ||
|
|
||
| ifeq ($(CONFIG_ARCH_ARMV7A),y) | ||
| CHIP_CSRCS += rk3506_pgalloc.c rk3506_memorymap.c | ||
| endif | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the path in all file