Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #ifndef __ASM_MACH_MFP_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #define __ASM_MACH_MFP_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #include <plat/mfp.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  * NOTE: the MFPR register bit definitions on PXA168 processor lines are a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9)  * bit different from those on PXA3xx.  Bit [7:10] are now reserved, which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)  * were SLEEP_OE_N, SLEEP_DATA, SLEEP_SEL and the LSB of DRIVE bits.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)  * To cope with this difference and re-use the pxa3xx mfp code as much as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)  * possible, we make the following compromise:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)  * 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)  * 2. DRIVE strength definitions redefined to include the reserved bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)  *    - the reserved bit differs between pxa168 and pxa910, and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)  *      MFP_DRIVE_* macros are individually defined in mfp-pxa{168,910}.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)  * 3. Override MFP_CFG() and MFP_CFG_DRV()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)  * 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #undef MFP_CFG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #undef MFP_CFG_DRV
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #undef MFP_CFG_LPM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #undef MFP_CFG_X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #undef MFP_CFG_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define MFP_CFG(pin, af)		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	(MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define MFP_CFG_DRV(pin, af, drv)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	(MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #endif /* __ASM_MACH_MFP_H */