This add fdt_pinctrl to Allwinner Soc (A10 and A20).
The hardware module is the same as the gpio controller.
This also remove hack to set some pins to emac or gmac function, now it uses the pinctrl data in the dts nodes.
The gpio controller now reports the correct number of pins instead of returning the number of bank * 32.
Details
- Reviewers
- None
- Commits
- rS295711: Move the Allwinner kernels to use fdt_pinctrl. This will read the pin
Apply patch, test on HW
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Fix silly mistake, gpio_max_pin must returns pin number - 1.
Hopefully the last update.
sys/arm/allwinner/a10_gpio.c | ||
---|---|---|
223 ↗ | (On Diff #13182) | 0x03? |
431–447 ↗ | (On Diff #13182) | This looks like it's getting quite deep, does it pas the 80 character limit? |
sys/arm/allwinner/files.allwinner | ||
10 ↗ | (On Diff #13182) | You should add SOC_A10 and SOC_A20 to sys/conf/options.arm. you can then move this to files.a10, and the below change to files.a20. |
sys/arm/allwinner/files.allwinner | ||
---|---|---|
10 ↗ | (On Diff #13182) | I still want to soon be able to provide one generic allwinner kernel that's why I didn't put the files in separate files. |
sys/arm/allwinner/allwinner_pinctrl.h | ||
---|---|---|
28 ↗ | (On Diff #13271) | No tab after #ifndef, only after #define (some tab rules are odd) |
sys/arm/allwinner/files.allwinner | ||
10 ↗ | (On Diff #13271) | That can still be done, but even with a generic Allwinner kernel we should still endeavour to support a custom SoC specific kernel, even if it;s not in the tree. |
Add SOC_A10 and SOC_A20 option and use them in A10/A20 kernel config.
Only use a10_padconf/a20_padconf is the options is defined.
Fix minor style(9) issue.
Also move a20_padconf.c into a20 subfolder.
sys/arm/allwinner/a20/a20_padconf.c | ||
---|---|---|
27 ↗ | (On Diff #13366) | Missing #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); |
35 ↗ | (On Diff #13366) | This isn't needed, we can limit when this file is built from based on the contents of files.*. We can later select which group of files to include based on which of the SOC_* options is set. |
sys/arm/allwinner/std.a10 | ||
13 ↗ | (On Diff #13366) | This should be in the A10, A20, etc kernels as appropriate. |
sys/conf/options.arm | ||
41–42 ↗ | (On Diff #13366) | Having suggested these names I think I prefer SOC_ALLWINNER_A10 to reduce confusion with other A10 parts that may appear. |
Rename SOC_A10/SOC_A20 to SOC_ALLWINNER_A10/SOC_ALLWINNER_A20
Add FBSDID to *_padconf.c files.