1*802fee26SDamien Le Moal /* SPDX-License-Identifier: GPL-2.0-or-later */ 2*802fee26SDamien Le Moal /* 3*802fee26SDamien Le Moal * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com> 4*802fee26SDamien Le Moal * Copyright (c) 2020 Western Digital Corporation or its affiliates. 5*802fee26SDamien Le Moal */ 6*802fee26SDamien Le Moal #ifndef K210_SYSCTL_H 7*802fee26SDamien Le Moal #define K210_SYSCTL_H 8*802fee26SDamien Le Moal 9*802fee26SDamien Le Moal /* 10*802fee26SDamien Le Moal * Kendryte K210 SoC system controller registers offsets. 11*802fee26SDamien Le Moal * Taken from Kendryte SDK (kendryte-standalone-sdk). 12*802fee26SDamien Le Moal */ 13*802fee26SDamien Le Moal #define K210_SYSCTL_GIT_ID 0x00 /* Git short commit id */ 14*802fee26SDamien Le Moal #define K210_SYSCTL_UART_BAUD 0x04 /* Default UARTHS baud rate */ 15*802fee26SDamien Le Moal #define K210_SYSCTL_PLL0 0x08 /* PLL0 controller */ 16*802fee26SDamien Le Moal #define K210_SYSCTL_PLL1 0x0C /* PLL1 controller */ 17*802fee26SDamien Le Moal #define K210_SYSCTL_PLL2 0x10 /* PLL2 controller */ 18*802fee26SDamien Le Moal #define K210_SYSCTL_PLL_LOCK 0x18 /* PLL lock tester */ 19*802fee26SDamien Le Moal #define K210_SYSCTL_ROM_ERROR 0x1C /* AXI ROM detector */ 20*802fee26SDamien Le Moal #define K210_SYSCTL_SEL0 0x20 /* Clock select controller 0 */ 21*802fee26SDamien Le Moal #define K210_SYSCTL_SEL1 0x24 /* Clock select controller 1 */ 22*802fee26SDamien Le Moal #define K210_SYSCTL_EN_CENT 0x28 /* Central clock enable */ 23*802fee26SDamien Le Moal #define K210_SYSCTL_EN_PERI 0x2C /* Peripheral clock enable */ 24*802fee26SDamien Le Moal #define K210_SYSCTL_SOFT_RESET 0x30 /* Soft reset ctrl */ 25*802fee26SDamien Le Moal #define K210_SYSCTL_PERI_RESET 0x34 /* Peripheral reset controller */ 26*802fee26SDamien Le Moal #define K210_SYSCTL_THR0 0x38 /* Clock threshold controller 0 */ 27*802fee26SDamien Le Moal #define K210_SYSCTL_THR1 0x3C /* Clock threshold controller 1 */ 28*802fee26SDamien Le Moal #define K210_SYSCTL_THR2 0x40 /* Clock threshold controller 2 */ 29*802fee26SDamien Le Moal #define K210_SYSCTL_THR3 0x44 /* Clock threshold controller 3 */ 30*802fee26SDamien Le Moal #define K210_SYSCTL_THR4 0x48 /* Clock threshold controller 4 */ 31*802fee26SDamien Le Moal #define K210_SYSCTL_THR5 0x4C /* Clock threshold controller 5 */ 32*802fee26SDamien Le Moal #define K210_SYSCTL_THR6 0x50 /* Clock threshold controller 6 */ 33*802fee26SDamien Le Moal #define K210_SYSCTL_MISC 0x54 /* Miscellaneous controller */ 34*802fee26SDamien Le Moal #define K210_SYSCTL_PERI 0x58 /* Peripheral controller */ 35*802fee26SDamien Le Moal #define K210_SYSCTL_SPI_SLEEP 0x5C /* SPI sleep controller */ 36*802fee26SDamien Le Moal #define K210_SYSCTL_RESET_STAT 0x60 /* Reset source status */ 37*802fee26SDamien Le Moal #define K210_SYSCTL_DMA_SEL0 0x64 /* DMA handshake selector 0 */ 38*802fee26SDamien Le Moal #define K210_SYSCTL_DMA_SEL1 0x68 /* DMA handshake selector 1 */ 39*802fee26SDamien Le Moal #define K210_SYSCTL_POWER_SEL 0x6C /* IO Power Mode Select controller */ 40*802fee26SDamien Le Moal 41*802fee26SDamien Le Moal #endif 42