Page MenuHomeFreeBSD

Add fdl_pinctrl to Allwinner SoC
ClosedPublic

Authored by manu_bidouilliste.com on Feb 3 2016, 1:15 PM.
Tags
Referenced Files
Unknown Object (File)
Wed, May 1, 2:29 AM
Unknown Object (File)
Fri, Apr 26, 5:27 AM
Unknown Object (File)
Fri, Apr 26, 5:19 AM
Unknown Object (File)
Mar 24 2024, 8:49 PM
Unknown Object (File)
Mar 15 2024, 7:10 AM
Unknown Object (File)
Feb 15 2024, 12:46 PM
Unknown Object (File)
Feb 15 2024, 11:39 AM
Unknown Object (File)
Feb 8 2024, 2:25 AM

Details

Summary

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.

Test Plan

Apply patch, test on HW

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

manu_bidouilliste.com retitled this revision from to Add fdl_pinctrl to Allwinner SoC.
manu_bidouilliste.com updated this object.
manu_bidouilliste.com edited the test plan for this revision. (Show Details)
manu_bidouilliste.com set the repository for this revision to rS FreeBSD src repository - subversion.
manu_bidouilliste.com added a project: ARM.

Return only the padname instead of "pin %number (%name)" for the gpio name.

Fix silly mistake, gpio_max_pin must returns pin number - 1.

Hopefully the last update.

Update diff due to recent -HEAD changes.

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.

Update patch based on andrew comments.

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.

This revision was automatically updated to reflect the committed changes.